diff options
author | Damien George <damien.p.george@gmail.com> | 2017-05-16 17:40:22 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-05-16 17:40:22 +1000 |
commit | 37bd3b4f4cbbfabc86b03f8df8a3047fa2b65dd1 (patch) | |
tree | 48505c032157e5ca81064c6bc3debd20a82764d3 | |
parent | 4b235800a4ebba19a98bba50a5a98d2c407d99a7 (diff) | |
download | micropython-37bd3b4f4cbbfabc86b03f8df8a3047fa2b65dd1.tar.gz micropython-37bd3b4f4cbbfabc86b03f8df8a3047fa2b65dd1.zip |
stmhal/modmachine: Add machine.UART class, linking to pyb.UART.
pyb.UART has a superset of machine.UART functionality so can be used to
provide compatibility with other ports that also implement machine.UART.
-rw-r--r-- | stmhal/modmachine.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stmhal/modmachine.c b/stmhal/modmachine.c index 98d5c2da98..40b5b7bf3e 100644 --- a/stmhal/modmachine.c +++ b/stmhal/modmachine.c @@ -50,6 +50,7 @@ #include "rtc.h" #include "i2c.h" #include "spi.h" +#include "uart.h" #include "wdt.h" #if defined(MCU_SERIES_F4) @@ -557,9 +558,9 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { // initialize master mode on the peripheral. { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&machine_i2c_type) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&machine_hard_spi_type) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&pyb_uart_type) }, { MP_ROM_QSTR(MP_QSTR_WDT), MP_ROM_PTR(&pyb_wdt_type) }, #if 0 - { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&pyb_uart_type) }, { MP_ROM_QSTR(MP_QSTR_Timer), MP_ROM_PTR(&pyb_timer_type) }, { MP_ROM_QSTR(MP_QSTR_HeartBeat), MP_ROM_PTR(&pyb_heartbeat_type) }, { MP_ROM_QSTR(MP_QSTR_SD), MP_ROM_PTR(&pyb_sd_type) }, |