|
|
@ -70,7 +70,7 @@ typedef struct _machine_hard_spi_obj_t { |
|
|
|
STATIC machine_hard_spi_obj_t machine_hard_spi_obj[] = { |
|
|
|
#if defined(MICROPY_HW_SPI0_RSPCK) |
|
|
|
{ |
|
|
|
{&machine_hard_spi_type}, 0, |
|
|
|
{&machine_spi_type}, 0, |
|
|
|
DEFAULT_SPI_POLARITY, DEFAULT_SPI_PHASE, DEFAULT_SPI_BITS, |
|
|
|
DEFAULT_SPI_FIRSTBIT, DEFAULT_SPI_BAUDRATE, |
|
|
|
MICROPY_HW_SPI0_RSPCK, MICROPY_HW_SPI0_MOSI, MICROPY_HW_SPI0_MISO, |
|
|
@ -78,7 +78,7 @@ STATIC machine_hard_spi_obj_t machine_hard_spi_obj[] = { |
|
|
|
#endif |
|
|
|
#if defined(MICROPY_HW_SPI1_RSPCK) |
|
|
|
{ |
|
|
|
{&machine_hard_spi_type}, 1, |
|
|
|
{&machine_spi_type}, 1, |
|
|
|
DEFAULT_SPI_POLARITY, DEFAULT_SPI_PHASE, DEFAULT_SPI_BITS, |
|
|
|
DEFAULT_SPI_FIRSTBIT, DEFAULT_SPI_BAUDRATE, |
|
|
|
MICROPY_HW_SPI1_RSPCK, MICROPY_HW_SPI1_MOSI, MICROPY_HW_SPI1_MISO, |
|
|
@ -298,7 +298,7 @@ STATIC const mp_machine_spi_p_t machine_hard_spi_p = { |
|
|
|
}; |
|
|
|
|
|
|
|
MP_DEFINE_CONST_OBJ_TYPE( |
|
|
|
machine_hard_spi_type, |
|
|
|
machine_spi_type, |
|
|
|
MP_QSTR_SPI, |
|
|
|
MP_TYPE_FLAG_NONE, |
|
|
|
make_new, machine_hard_spi_make_new, |
|
|
|