summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/modmachine.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-10-19 22:48:21 +0100
committerDamien George <damien.p.george@gmail.com>2015-10-19 22:50:59 +0100
commit2f96b1982a84b21788756d9220b5c4ead657e8f7 (patch)
tree46610fdc236c3e2a28409fd8caee1783b0c16c00 /stmhal/modmachine.c
parentbedab235f9028562b6677fa257cd08fbf1efecca (diff)
downloadmicropython-2f96b1982a84b21788756d9220b5c4ead657e8f7.tar.gz
micropython-2f96b1982a84b21788756d9220b5c4ead657e8f7.zip
stmhal: Bring Pin class close to new machine module specification.
Looks like we can use the same Pin class for legacy pyb module and new machine module.
Diffstat (limited to 'stmhal/modmachine.c')
-rw-r--r--stmhal/modmachine.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/stmhal/modmachine.c b/stmhal/modmachine.c
index 0d6ada635c..b452e223ec 100644
--- a/stmhal/modmachine.c
+++ b/stmhal/modmachine.c
@@ -35,6 +35,7 @@
#include "irq.h"
#include "rng.h"
#include "storage.h"
+#include "pin.h"
#include "timer.h"
#include "usb.h"
@@ -409,9 +410,11 @@ STATIC const mp_map_elem_t machine_module_globals_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_disable_irq), (mp_obj_t)&pyb_disable_irq_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_enable_irq), (mp_obj_t)&pyb_enable_irq_obj },
+
+ { MP_OBJ_NEW_QSTR(MP_QSTR_Pin), (mp_obj_t)&pin_type },
+
#if 0
{ MP_OBJ_NEW_QSTR(MP_QSTR_RTC), (mp_obj_t)&pyb_rtc_type },
- { MP_OBJ_NEW_QSTR(MP_QSTR_Pin), (mp_obj_t)&pin_type },
{ MP_OBJ_NEW_QSTR(MP_QSTR_ADC), (mp_obj_t)&pyb_adc_type },
{ MP_OBJ_NEW_QSTR(MP_QSTR_I2C), (mp_obj_t)&pyb_i2c_type },
{ MP_OBJ_NEW_QSTR(MP_QSTR_SPI), (mp_obj_t)&pyb_spi_type },