Remove lots of micropython-specific remnants

This commit is contained in:
Josh Klar 2018-11-05 21:45:02 -08:00
parent 6a82d3da7d
commit d8b9117db9
No known key found for this signature in database
GPG Key ID: 220F99BD7DB7A99E
11 changed files with 1 additions and 91 deletions

4
.gitmodules vendored
View File

@ -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

View File

@ -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)"

View File

@ -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 $@

View File

@ -1,3 +1,2 @@
[submodules]
"vendor/micropython" = "65a49fa"
"vendor/upy-lib" = "451b1c0"

View File

@ -1,3 +0,0 @@
class DigitalInOut:
def __init__(self, *args, **kwargs):
pass

View File

@ -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)

View File

@ -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))

View File

@ -1 +0,0 @@
devices = []

1
vendor/micropython vendored

@ -1 +0,0 @@
Subproject commit 65a49fa3c80e7432ccb35b9f34e5c4c0a62b933d