Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit 37bd3b4

Browse files
committed
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.
1 parent 4b23580 commit 37bd3b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stmhal/modmachine.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
#include "rtc.h"
5151
#include "i2c.h"
5252
#include "spi.h"
53+
#include "uart.h"
5354
#include "wdt.h"
5455

5556
#if defined(MCU_SERIES_F4)
@@ -557,9 +558,9 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
557558
// initialize master mode on the peripheral.
558559
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&machine_i2c_type) },
559560
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&machine_hard_spi_type) },
561+
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&pyb_uart_type) },
560562
{ MP_ROM_QSTR(MP_QSTR_WDT), MP_ROM_PTR(&pyb_wdt_type) },
561563
#if 0
562-
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&pyb_uart_type) },
563564
{ MP_ROM_QSTR(MP_QSTR_Timer), MP_ROM_PTR(&pyb_timer_type) },
564565
{ MP_ROM_QSTR(MP_QSTR_HeartBeat), MP_ROM_PTR(&pyb_heartbeat_type) },
565566
{ MP_ROM_QSTR(MP_QSTR_SD), MP_ROM_PTR(&pyb_sd_type) },

0 commit comments

Comments
 (0)