esp8266: Add initial implementation of machine.UART.

Currently UART(0) and UART(1) are exposed and only uart.write works.
This commit is contained in:
Damien George
2016-04-06 19:45:52 +03:00
committed by Paul Sokolovsky
parent 4e51a3038c
commit 1a0a323ca8
6 changed files with 165 additions and 0 deletions

View File

@@ -158,6 +158,7 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_Pin), MP_ROM_PTR(&pyb_pin_type) },
{ MP_ROM_QSTR(MP_QSTR_PWM), MP_ROM_PTR(&pyb_pwm_type) },
{ MP_ROM_QSTR(MP_QSTR_ADC), MP_ROM_PTR(&pyb_adc_type) },
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&pyb_uart_type) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&pyb_i2c_type) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&pyb_spi_type) },
};