summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/esp32/machine_hw_spi.c4
-rw-r--r--ports/esp32/machine_i2c.c4
-rw-r--r--ports/esp32/modmachine.c4
-rw-r--r--ports/esp32/modmachine.h4
4 files changed, 8 insertions, 8 deletions
diff --git a/ports/esp32/machine_hw_spi.c b/ports/esp32/machine_hw_spi.c
index 647874e17..35ecc397b 100644
--- a/ports/esp32/machine_hw_spi.c
+++ b/ports/esp32/machine_hw_spi.c
@@ -490,7 +490,7 @@ mp_obj_t machine_hw_spi_make_new(const mp_obj_type_t *type, size_t n_args, size_
self = &machine_hw_spi_obj[1];
default_pins = &machine_hw_spi_default_pins[1];
}
- self->base.type = &machine_hw_spi_type;
+ self->base.type = &machine_spi_type;
int8_t sck, mosi, miso;
@@ -540,7 +540,7 @@ STATIC const mp_machine_spi_p_t machine_hw_spi_p = {
};
MP_DEFINE_CONST_OBJ_TYPE(
- machine_hw_spi_type,
+ machine_spi_type,
MP_QSTR_SPI,
MP_TYPE_FLAG_NONE,
make_new, machine_hw_spi_make_new,
diff --git a/ports/esp32/machine_i2c.c b/ports/esp32/machine_i2c.c
index 9244343dc..17e98ffc5 100644
--- a/ports/esp32/machine_i2c.c
+++ b/ports/esp32/machine_i2c.c
@@ -161,7 +161,7 @@ mp_obj_t machine_hw_i2c_make_new(const mp_obj_type_t *type, size_t n_args, size_
bool first_init = false;
if (self->base.type == NULL) {
// Created for the first time, set default pins
- self->base.type = &machine_hw_i2c_type;
+ self->base.type = &machine_i2c_type;
self->port = i2c_id;
if (self->port == I2C_NUM_0) {
self->scl = MICROPY_HW_I2C0_SCL;
@@ -193,7 +193,7 @@ STATIC const mp_machine_i2c_p_t machine_hw_i2c_p = {
};
MP_DEFINE_CONST_OBJ_TYPE(
- machine_hw_i2c_type,
+ machine_i2c_type,
MP_QSTR_I2C,
MP_TYPE_FLAG_NONE,
make_new, machine_hw_i2c_make_new,
diff --git a/ports/esp32/modmachine.c b/ports/esp32/modmachine.c
index a70f2fbed..e24afd040 100644
--- a/ports/esp32/modmachine.c
+++ b/ports/esp32/modmachine.c
@@ -315,14 +315,14 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
#if MICROPY_PY_MACHINE_DAC
{ MP_ROM_QSTR(MP_QSTR_DAC), MP_ROM_PTR(&machine_dac_type) },
#endif
- { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&machine_hw_i2c_type) },
+ { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&machine_i2c_type) },
{ MP_ROM_QSTR(MP_QSTR_SoftI2C), MP_ROM_PTR(&mp_machine_soft_i2c_type) },
#if MICROPY_PY_MACHINE_I2S
{ MP_ROM_QSTR(MP_QSTR_I2S), MP_ROM_PTR(&machine_i2s_type) },
#endif
{ MP_ROM_QSTR(MP_QSTR_PWM), MP_ROM_PTR(&machine_pwm_type) },
{ MP_ROM_QSTR(MP_QSTR_RTC), MP_ROM_PTR(&machine_rtc_type) },
- { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&machine_hw_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) },
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&machine_uart_type) },
diff --git a/ports/esp32/modmachine.h b/ports/esp32/modmachine.h
index 4d2ab9020..138a89e9c 100644
--- a/ports/esp32/modmachine.h
+++ b/ports/esp32/modmachine.h
@@ -16,8 +16,8 @@ extern const mp_obj_type_t machine_touchpad_type;
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_hw_i2c_type;
-extern const mp_obj_type_t machine_hw_spi_type;
+extern const mp_obj_type_t machine_i2c_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;