Remove lots of micropython-specific remnants
This commit is contained in:
parent
6a82d3da7d
commit
d8b9117db9
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -2,7 +2,3 @@
|
||||
path = vendor/upy-lib
|
||||
url = https://github.com/kmkfw/micropython-lib.git
|
||||
ignore = dirty
|
||||
[submodule "micropython"]
|
||||
path = vendor/micropython
|
||||
url = https://github.com/kmkfw/micropython.git
|
||||
ignore = dirty
|
||||
|
24
Makefile
24
Makefile
@ -43,7 +43,7 @@ fix-isort: devdeps
|
||||
|
||||
clean: clean-build-log
|
||||
@echo "===> Cleaning build artifacts"
|
||||
@rm -rf .submodules .circuitpy-deps .micropython-deps .devdeps build
|
||||
@rm -rf .submodules .circuitpy-deps .devdeps build
|
||||
|
||||
clean-build-log:
|
||||
@echo "===> Clearing previous .build.log"
|
||||
@ -65,29 +65,7 @@ test: lint
|
||||
@rsync -ah vendor/ build/
|
||||
@touch .submodules
|
||||
|
||||
.micropython-deps: .submodules
|
||||
@echo "===> Building micropython/mpy-cross"
|
||||
@echo "===> Building micropython/mpy-cross" >> .build.log
|
||||
@pipenv run $(MAKE) -C build/micropython/mpy-cross 2>&1 >> .build.log
|
||||
@touch .micropython-deps
|
||||
|
||||
submodules: .submodules
|
||||
micropython-deps: .micropython-deps
|
||||
|
||||
build/micropython/ports/unix/micropython: micropython-deps build/micropython/ports/unix/modules/.kmk_frozen
|
||||
@echo "===> Building MicroPython for Unix"
|
||||
@echo "===> Building MicroPython for Unix" >> .build.log
|
||||
@pipenv run $(MAKE) -j4 -C build/micropython/ports/unix 2>&1 >> .build.log
|
||||
|
||||
micropython-build-unix: build/micropython/ports/unix/micropython
|
||||
|
||||
build/micropython/ports/unix/modules/.kmk_frozen: upy-freeze.txt submodules.toml
|
||||
@echo "===> Preparing vendored dependencies for bundling into MicroPython for Unix"
|
||||
@echo "===> Preparing vendored dependencies for bundling into MicroPython for Unix" >> .build.log
|
||||
@rm -rf build/micropython/ports/unix/modules/*
|
||||
@cat upy-freeze.txt | egrep -v '(^#|^\s*$|^\s*\t*#)' | grep MICROPY | cut -d'|' -f2- | \
|
||||
xargs -I '{}' rsync -ah {} build/micropython/ports/unix/modules/
|
||||
@touch $@
|
||||
|
||||
reset-bootloader:
|
||||
@echo "===> Rebooting your board to bootloader (safe to ignore file not found errors)"
|
||||
|
@ -1,6 +0,0 @@
|
||||
if [ ! -f build/micropython/ports/unix/micropython ]; then
|
||||
echo "Run make micropython-build-unix"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
build/micropython/ports/unix/micropython $@
|
@ -1,3 +1,2 @@
|
||||
[submodules]
|
||||
"vendor/micropython" = "65a49fa"
|
||||
"vendor/upy-lib" = "451b1c0"
|
||||
|
@ -1,3 +0,0 @@
|
||||
class DigitalInOut:
|
||||
def __init__(self, *args, **kwargs):
|
||||
pass
|
@ -1,38 +0,0 @@
|
||||
class Anything:
|
||||
'''
|
||||
A stub class which will repr as a provided name
|
||||
'''
|
||||
def __init__(self, name):
|
||||
self.name = name
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
return self
|
||||
|
||||
def __repr__(self):
|
||||
return 'Anything<{}>'.format(self.name)
|
||||
|
||||
def init(self, *args, **kwargs):
|
||||
pass
|
||||
|
||||
@property
|
||||
def value(self):
|
||||
return False
|
||||
|
||||
|
||||
class Passthrough:
|
||||
def __getattr__(self, attr):
|
||||
return Anything(attr)
|
||||
|
||||
|
||||
class Pin:
|
||||
board = Passthrough()
|
||||
IN = 'IN'
|
||||
OUT = 'OUT'
|
||||
PULL_DOWN = 'PULL_DOWN'
|
||||
PULL_UP = 'PULL_UP'
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
return self.board
|
||||
|
||||
def __getattr__(self, attr):
|
||||
return getattr(self.board, attr)
|
@ -1,14 +0,0 @@
|
||||
try:
|
||||
from collections import namedtuple
|
||||
except ImportError:
|
||||
from ucollections import namedtuple
|
||||
|
||||
HIDMode = namedtuple('HIDMode', (
|
||||
'subclass',
|
||||
'protocol',
|
||||
'max_packet_length',
|
||||
'polling_interval',
|
||||
'report_descriptor',
|
||||
))
|
||||
|
||||
hid_keyboard = HIDMode(0, 0, 0, 0, bytearray(0))
|
@ -1 +0,0 @@
|
||||
devices = []
|
1
vendor/micropython
vendored
1
vendor/micropython
vendored
@ -1 +0,0 @@
|
||||
Subproject commit 65a49fa3c80e7432ccb35b9f34e5c4c0a62b933d
|
Loading…
Reference in New Issue
Block a user