Browse Source

renesas-ra: Rename machine SPI type consistently across ports.

This renames:
- machine_hard_spi_type -> machine_spi_type
pull/9699/head
iabdalkader 2 years ago
committed by Damien George
parent
commit
bfa6f34404
  1. 6
      ports/renesas-ra/machine_spi.c
  2. 2
      ports/renesas-ra/modmachine.c
  3. 2
      ports/renesas-ra/modmachine.h

6
ports/renesas-ra/machine_spi.c

@ -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,

2
ports/renesas-ra/modmachine.c

@ -286,7 +286,7 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_SoftI2C), MP_ROM_PTR(&mp_machine_soft_i2c_type) },
#endif
#if MICROPY_PY_MACHINE_SPI
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&machine_hard_spi_type) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&machine_spi_type) },
{ MP_ROM_QSTR(MP_QSTR_SoftSPI), MP_ROM_PTR(&mp_machine_soft_spi_type) },
#endif
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&machine_uart_type) },

2
ports/renesas-ra/modmachine.h

@ -37,7 +37,7 @@ extern const mp_obj_type_t machine_adc_type;
extern const mp_obj_type_t machine_adcblock_type;
extern const mp_obj_type_t machine_dac_type;
extern const mp_obj_type_t machine_i2c_type;
extern const mp_obj_type_t machine_hard_spi_type;
extern const mp_obj_type_t machine_spi_type;
extern const mp_obj_type_t machine_i2s_type;
extern const mp_obj_type_t machine_uart_type;
extern const mp_obj_type_t machine_rtc_type;

Loading…
Cancel
Save