nrf5/uart: Moving UART from pyb to machine module.

This commit is contained in:
Glenn Ruben Bakke 2017-03-10 22:48:43 +01:00
parent 611b829138
commit 1aecf560da
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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 }*/
};