From dba40afa706a1ac4b102dceba217844dc1540ce7 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 4 Sep 2016 20:33:11 +0300 Subject: esp8266/modmachine: Simplify SPI class implementation multiplexing. modpybhspi now does the needed multiplexing, calling out to modpybspi (bitbanging SPI) for suitable peripheral ID's. modmachinespi (previous multiplexer class) thus not needed and removed. modpybhspi also updated to following standard SPI peripheral naming: SPI0 is used for FlashROM and thus not supported so far. SPI1 is available for users, and thus needs to be instantiated as: spi = machine.SPI(1, ...) --- esp8266/modmachine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'esp8266/modmachine.c') diff --git a/esp8266/modmachine.c b/esp8266/modmachine.c index a6d5fc3dbb..df1ae0fcf6 100644 --- a/esp8266/modmachine.c +++ b/esp8266/modmachine.c @@ -254,7 +254,7 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = { { 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(&machine_i2c_type) }, - { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&machine_spi_type) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&pyb_hspi_type) }, // wake abilities { MP_ROM_QSTR(MP_QSTR_DEEPSLEEP), MP_ROM_INT(MACHINE_WAKE_DEEPSLEEP) }, -- cgit v1.2.3