Skip to content

Commit d4a5ca5

Browse files
committed
stmhal/spi: Make machine.SPI class conform to correct API.
Includes both software and hardware SPI implementations.
1 parent 077dbf4 commit d4a5ca5

3 files changed

Lines changed: 413 additions & 97 deletions

File tree

stmhal/modmachine.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -527,10 +527,10 @@ STATIC const mp_map_elem_t machine_module_globals_table[] = {
527527
{ MP_OBJ_NEW_QSTR(MP_QSTR_RTC), (mp_obj_t)&pyb_rtc_type },
528528
{ MP_OBJ_NEW_QSTR(MP_QSTR_ADC), (mp_obj_t)&pyb_adc_type },
529529
#endif
530-
// TODO: Per new API, both types below, if called with 1 arg (ID), should still
530+
// TODO: Per new API, I2C types below, if called with 1 arg (ID), should still
531531
// initialize master mode on the peripheral.
532532
{ MP_OBJ_NEW_QSTR(MP_QSTR_I2C), (mp_obj_t)&machine_i2c_type },
533-
{ MP_OBJ_NEW_QSTR(MP_QSTR_SPI), (mp_obj_t)&pyb_spi_type },
533+
{ MP_OBJ_NEW_QSTR(MP_QSTR_SPI), (mp_obj_t)&machine_hard_spi_type },
534534
{ MP_OBJ_NEW_QSTR(MP_QSTR_WDT), (mp_obj_t)&pyb_wdt_type },
535535
#if 0
536536
{ MP_OBJ_NEW_QSTR(MP_QSTR_UART), (mp_obj_t)&pyb_uart_type },

0 commit comments

Comments
 (0)