Skip to content

Commit bfa6f34

Browse files
iabdalkaderdpgeorge
authored andcommitted
renesas-ra: Rename machine SPI type consistently across ports.
This renames: - machine_hard_spi_type -> machine_spi_type
1 parent e275a58 commit bfa6f34

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

ports/renesas-ra/machine_spi.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@ typedef struct _machine_hard_spi_obj_t {
7070
STATIC machine_hard_spi_obj_t machine_hard_spi_obj[] = {
7171
#if defined(MICROPY_HW_SPI0_RSPCK)
7272
{
73-
{&machine_hard_spi_type}, 0,
73+
{&machine_spi_type}, 0,
7474
DEFAULT_SPI_POLARITY, DEFAULT_SPI_PHASE, DEFAULT_SPI_BITS,
7575
DEFAULT_SPI_FIRSTBIT, DEFAULT_SPI_BAUDRATE,
7676
MICROPY_HW_SPI0_RSPCK, MICROPY_HW_SPI0_MOSI, MICROPY_HW_SPI0_MISO,
7777
},
7878
#endif
7979
#if defined(MICROPY_HW_SPI1_RSPCK)
8080
{
81-
{&machine_hard_spi_type}, 1,
81+
{&machine_spi_type}, 1,
8282
DEFAULT_SPI_POLARITY, DEFAULT_SPI_PHASE, DEFAULT_SPI_BITS,
8383
DEFAULT_SPI_FIRSTBIT, DEFAULT_SPI_BAUDRATE,
8484
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 = {
298298
};
299299

300300
MP_DEFINE_CONST_OBJ_TYPE(
301-
machine_hard_spi_type,
301+
machine_spi_type,
302302
MP_QSTR_SPI,
303303
MP_TYPE_FLAG_NONE,
304304
make_new, machine_hard_spi_make_new,

ports/renesas-ra/modmachine.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
286286
{ MP_ROM_QSTR(MP_QSTR_SoftI2C), MP_ROM_PTR(&mp_machine_soft_i2c_type) },
287287
#endif
288288
#if MICROPY_PY_MACHINE_SPI
289-
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&machine_hard_spi_type) },
289+
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&machine_spi_type) },
290290
{ MP_ROM_QSTR(MP_QSTR_SoftSPI), MP_ROM_PTR(&mp_machine_soft_spi_type) },
291291
#endif
292292
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&machine_uart_type) },

ports/renesas-ra/modmachine.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ extern const mp_obj_type_t machine_adc_type;
3737
extern const mp_obj_type_t machine_adcblock_type;
3838
extern const mp_obj_type_t machine_dac_type;
3939
extern const mp_obj_type_t machine_i2c_type;
40-
extern const mp_obj_type_t machine_hard_spi_type;
40+
extern const mp_obj_type_t machine_spi_type;
4141
extern const mp_obj_type_t machine_i2s_type;
4242
extern const mp_obj_type_t machine_uart_type;
4343
extern const mp_obj_type_t machine_rtc_type;

0 commit comments

Comments
 (0)