summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/mpconfigport.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-11-24 00:20:51 +1100
committerDamien George <damien.p.george@gmail.com>2016-11-24 00:20:51 +1100
commit30537489877fd77e129623f93d3921f547668fb8 (patch)
tree1a80f6539e5abd76293574d1019221278375e347 /stmhal/mpconfigport.h
parent5d2279bec12da4da62e38544608198b57a47efd2 (diff)
downloadmicropython-30537489877fd77e129623f93d3921f547668fb8.tar.gz
micropython-30537489877fd77e129623f93d3921f547668fb8.zip
stmhal: Add beginnings of port-specific machine.I2C implementation.
This allows one to construct an I2C object using ids that are specific to the stmhal port, eg machine.I2C('X'). Right now the implementation of I2C uses software I2C but the idea is to just change the C-level I2C protocol functions to hardware implementations later on.
Diffstat (limited to 'stmhal/mpconfigport.h')
-rw-r--r--stmhal/mpconfigport.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/stmhal/mpconfigport.h b/stmhal/mpconfigport.h
index 66ec364724..ed9e26f37c 100644
--- a/stmhal/mpconfigport.h
+++ b/stmhal/mpconfigport.h
@@ -103,6 +103,7 @@
#define MICROPY_PY_MACHINE (1)
#define MICROPY_PY_MACHINE_PULSE (1)
#define MICROPY_PY_MACHINE_I2C (1)
+#define MICROPY_PY_MACHINE_I2C_MAKE_NEW machine_hard_i2c_make_new
#define MICROPY_PY_MACHINE_SPI (1)
#define MICROPY_PY_MACHINE_SPI_MIN_DELAY (0)
#define MICROPY_PY_FRAMEBUF (1)