aboutsummaryrefslogtreecommitdiff
path: root/stmhal/modmachine.c
diff options
context:
space:
mode:
authorDamien George2016-04-12 13:51:39 +0100
committerDamien George2016-04-12 14:06:54 +0100
commite4f963a351975dd71495b3cc92d817b97243250a (patch)
treeef850948c8c916ea27684886daad51784ff47bbd /stmhal/modmachine.c
parent69a1aaf654442247e01655035a5cfb34568b1b80 (diff)
stmhal: Use new generic I2C object in machine module.
Diffstat (limited to 'stmhal/modmachine.c')
-rw-r--r--stmhal/modmachine.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/stmhal/modmachine.c b/stmhal/modmachine.c
index 6d71f5c62..7e2b1a63b 100644
--- a/stmhal/modmachine.c
+++ b/stmhal/modmachine.c
@@ -31,6 +31,7 @@
#include "py/runtime.h"
#include "py/mphal.h"
#include "extmod/machine_mem.h"
+#include "extmod/machine_i2c.h"
#include "lib/fatfs/ff.h"
#include "lib/fatfs/diskio.h"
#include "gccollect.h"
@@ -449,7 +450,7 @@ STATIC const mp_map_elem_t machine_module_globals_table[] = {
#endif
// TODO: Per new API, both types below, if called with 1 arg (ID), should still
// initialize master mode on the peripheral.
- { MP_OBJ_NEW_QSTR(MP_QSTR_I2C), (mp_obj_t)&pyb_i2c_type },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_I2C), (mp_obj_t)&machine_i2c_type },
{ MP_OBJ_NEW_QSTR(MP_QSTR_SPI), (mp_obj_t)&pyb_spi_type },
#if 0
{ MP_OBJ_NEW_QSTR(MP_QSTR_UART), (mp_obj_t)&pyb_uart_type },