summaryrefslogtreecommitdiff
path: root/ports/nrf
diff options
context:
space:
mode:
authorarturo182 <arturo182@tlen.pl>2018-02-07 00:03:00 +0100
committerarturo182 <arturo182@tlen.pl>2018-02-07 00:03:23 +0100
commitafaee7f782b3d75dbdfd7d0bff92e72897dbc750 (patch)
tree1a35bdb41c8ceab2a575733e75cf7a8963ae6607 /ports/nrf
parentd1b2f69771383e613ca530a171c54b6ea1ec7456 (diff)
nrf: Use the shared bitbangio module
Diffstat (limited to 'ports/nrf')
-rw-r--r--ports/nrf/Makefile17
-rw-r--r--ports/nrf/mpconfigport.h3
2 files changed, 13 insertions, 7 deletions
diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile
index 1ff534777..a147bae26 100644
--- a/ports/nrf/Makefile
+++ b/ports/nrf/Makefile
@@ -233,20 +233,25 @@ SRC_SHARED_MODULE = \
storage/__init__.c \
struct/__init__.c \
gamepad/__init__.c \
- gamepad/GamePad.c
-
-# bitbangio/__init__.c \
+ gamepad/GamePad.c \
+ bitbangio/__init__.c \
bitbangio/I2C.c \
bitbangio/OneWire.c \
- bitbangio/SPI.c \
- busio/OneWire.c \
+ bitbangio/SPI.c
+
+# busio/OneWire.c \
uheap/__init__.c \
ustack/__init__.c
SRC_SHARED_BINDINGS = \
struct/__init__.c \
gamepad/__init__.c \
- gamepad/GamePad.c
+ gamepad/GamePad.c \
+ bitbangio/__init__.c \
+ bitbangio/I2C.c \
+ bitbangio/SPI.c \
+ bitbangio/OneWire.c
+
SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_BINDINGS)) \
$(addprefix shared-module/, $(SRC_SHARED_MODULE))
diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h
index 483e20c65..267a5e510 100644
--- a/ports/nrf/mpconfigport.h
+++ b/ports/nrf/mpconfigport.h
@@ -129,7 +129,6 @@
#define MICROPY_PY_MACHINE_PULSE (0)
#define MICROPY_PY_MACHINE_I2C_MAKE_NEW machine_hard_i2c_make_new
#define MICROPY_PY_MACHINE_SPI (0)
-#define MICROPY_PY_MACHINE_SPI_MIN_DELAY (0)
#define MICROPY_PY_FRAMEBUF (0)
#define MICROPY_KBD_EXCEPTION (1)
@@ -217,6 +216,7 @@ typedef long mp_off_t;
// extra built in modules to add to the list of known ones
extern const struct _mp_obj_module_t microcontroller_module;
+extern const struct _mp_obj_module_t bitbangio_module;
extern const struct _mp_obj_module_t analogio_module;
extern const struct _mp_obj_module_t digitalio_module;
extern const struct _mp_obj_module_t pulseio_module;
@@ -271,6 +271,7 @@ extern const struct _mp_obj_module_t ble_module;
{ MP_OBJ_NEW_QSTR (MP_QSTR_digitalio ), (mp_obj_t)&digitalio_module }, \
{ MP_OBJ_NEW_QSTR (MP_QSTR_pulseio ), (mp_obj_t)&pulseio_module }, \
{ MP_OBJ_NEW_QSTR (MP_QSTR_microcontroller ), (mp_obj_t)&microcontroller_module }, \
+ { MP_OBJ_NEW_QSTR (MP_QSTR_bitbangio ), (mp_obj_t)&bitbangio_module }, \
{ MP_OBJ_NEW_QSTR (MP_QSTR_os ), (mp_obj_t)&os_module }, \
{ MP_OBJ_NEW_QSTR (MP_QSTR_random ), (mp_obj_t)&random_module }, \
{ MP_OBJ_NEW_QSTR (MP_QSTR_storage ), (mp_obj_t)&storage_module },\