From 1aecf560da9df6d0246020cb122ac6f8df8bdcfb Mon Sep 17 00:00:00 2001 From: Glenn Ruben Bakke Date: Fri, 10 Mar 2017 22:48:43 +0100 Subject: [PATCH] nrf5/uart: Moving UART from pyb to machine module. --- nrf5/modules/machine/modmachine.c | 2 ++ nrf5/modules/pyb/modpyb.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nrf5/modules/machine/modmachine.c b/nrf5/modules/machine/modmachine.c index c847a4fc60..8f78a12606 100644 --- a/nrf5/modules/machine/modmachine.c +++ b/nrf5/modules/machine/modmachine.c @@ -38,6 +38,7 @@ #include "lib/oofatfs/diskio.h" #include "gccollect.h" #include "pin.h" +#include "uart.h" #include "spi.h" #include "i2c.h" #if MICROPY_PY_MACHINE_PWM @@ -199,6 +200,7 @@ STATIC const mp_map_elem_t machine_module_globals_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_deepsleep), (mp_obj_t)&machine_deepsleep_obj }, { MP_OBJ_NEW_QSTR(MP_QSTR_reset_cause), (mp_obj_t)&machine_reset_cause_obj }, { MP_OBJ_NEW_QSTR(MP_QSTR_Pin), (mp_obj_t)&pin_type }, + { MP_OBJ_NEW_QSTR(MP_QSTR_UART), (mp_obj_t)&machine_hard_uart_type }, #if MICROPY_PY_MACHINE_HW_SPI { MP_OBJ_NEW_QSTR(MP_QSTR_SPI), (mp_obj_t)&machine_hard_spi_type }, #endif diff --git a/nrf5/modules/pyb/modpyb.c b/nrf5/modules/pyb/modpyb.c index 1a5848f869..8d09944a25 100644 --- a/nrf5/modules/pyb/modpyb.c +++ b/nrf5/modules/pyb/modpyb.c @@ -28,7 +28,6 @@ #include "lib/utils/pyexec.h" #include "py/runtime.h" #include "py/obj.h" -#include "uart.h" #include "led.h" #include "nrf.h" // TODO: figure out where to put this import #include "pin.h" @@ -37,7 +36,6 @@ STATIC const mp_map_elem_t pyb_module_globals_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR___name__), MP_OBJ_NEW_QSTR(MP_QSTR_pyb) }, { MP_OBJ_NEW_QSTR(MP_QSTR_LED), (mp_obj_t)&pyb_led_type }, { MP_OBJ_NEW_QSTR(MP_QSTR_repl_info), (mp_obj_t)&pyb_set_repl_info_obj}, - { MP_OBJ_NEW_QSTR(MP_QSTR_UART), (mp_obj_t)&machine_hard_uart_type }, { MP_OBJ_NEW_QSTR(MP_QSTR_Pin), (mp_obj_t)&pin_type }, /* { MP_OBJ_NEW_QSTR(MP_QSTR_main), (mp_obj_t)&pyb_main_obj }*/ };