| 
37 | 37 | #include "extmod/machine_signal.h"  | 
38 | 38 | #include "extmod/machine_pulse.h"  | 
39 | 39 | #include "extmod/machine_i2c.h"  | 
 | 40 | +#include "extmod/machine_spi.h"  | 
40 | 41 | #include "lib/utils/pyexec.h"  | 
41 | 42 | #include "lib/oofatfs/ff.h"  | 
42 | 43 | #include "extmod/vfs.h"  | 
@@ -415,9 +416,15 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {  | 
415 | 416 |     { MP_ROM_QSTR(MP_QSTR_RTC),                 MP_ROM_PTR(&pyb_rtc_type) },  | 
416 | 417 |     { MP_ROM_QSTR(MP_QSTR_ADC),                 MP_ROM_PTR(&machine_adc_type) },  | 
417 | 418 |     #if MICROPY_PY_MACHINE_I2C  | 
 | 419 | +    #if MICROPY_HW_ENABLE_HW_I2C  | 
 | 420 | +    { MP_ROM_QSTR(MP_QSTR_I2C),                 MP_ROM_PTR(&machine_hard_i2c_type) },  | 
 | 421 | +    #else  | 
418 | 422 |     { MP_ROM_QSTR(MP_QSTR_I2C),                 MP_ROM_PTR(&mp_machine_soft_i2c_type) },  | 
419 | 423 |     #endif  | 
 | 424 | +    { MP_ROM_QSTR(MP_QSTR_SoftI2C),             MP_ROM_PTR(&mp_machine_soft_i2c_type) },  | 
 | 425 | +    #endif  | 
420 | 426 |     { MP_ROM_QSTR(MP_QSTR_SPI),                 MP_ROM_PTR(&machine_hard_spi_type) },  | 
 | 427 | +    { MP_ROM_QSTR(MP_QSTR_SoftSPI),             MP_ROM_PTR(&mp_machine_soft_spi_type) },  | 
421 | 428 |     { MP_ROM_QSTR(MP_QSTR_UART),                MP_ROM_PTR(&pyb_uart_type) },  | 
422 | 429 |     { MP_ROM_QSTR(MP_QSTR_WDT),                 MP_ROM_PTR(&pyb_wdt_type) },  | 
423 | 430 |     { MP_ROM_QSTR(MP_QSTR_Timer),               MP_ROM_PTR(&machine_timer_type) },  | 
 | 
0 commit comments