Skip to content

Commit e275a58

Browse files
iabdalkaderdpgeorge
authored andcommitted
samd: Rename machine I2C type consistently across ports.
This renames: - machine_hw_i2c_type -> machine_i2c_type
1 parent 22ad45f commit e275a58

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Diff for: ports/samd/machine_i2c.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ mp_obj_t machine_i2c_make_new(const mp_obj_type_t *type, size_t n_args, size_t n
144144
}
145145

146146
// Get the peripheral object.
147-
machine_i2c_obj_t *self = mp_obj_malloc(machine_i2c_obj_t, &machine_hw_i2c_type);
147+
machine_i2c_obj_t *self = mp_obj_malloc(machine_i2c_obj_t, &machine_i2c_type);
148148
self->id = id;
149149
self->instance = sercom_instance[self->id];
150150

@@ -260,7 +260,7 @@ STATIC const mp_machine_i2c_p_t machine_i2c_p = {
260260
};
261261

262262
MP_DEFINE_CONST_OBJ_TYPE(
263-
machine_hw_i2c_type,
263+
machine_i2c_type,
264264
MP_QSTR_I2C,
265265
MP_TYPE_FLAG_NONE,
266266
make_new, machine_i2c_make_new,

Diff for: ports/samd/modmachine.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ STATIC const mp_rom_map_elem_t machine_module_globals_table[] = {
157157
{ MP_ROM_QSTR(MP_QSTR_Pin), MP_ROM_PTR(&machine_pin_type) },
158158
{ MP_ROM_QSTR(MP_QSTR_PWM), MP_ROM_PTR(&machine_pwm_type) },
159159
{ MP_ROM_QSTR(MP_QSTR_SoftI2C), MP_ROM_PTR(&mp_machine_soft_i2c_type) },
160-
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&machine_hw_i2c_type) },
160+
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&machine_i2c_type) },
161161
{ MP_ROM_QSTR(MP_QSTR_SoftSPI), MP_ROM_PTR(&mp_machine_soft_spi_type) },
162162
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&machine_spi_type) },
163163
{ MP_ROM_QSTR(MP_QSTR_Timer), MP_ROM_PTR(&machine_timer_type) },

Diff for: ports/samd/modmachine.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
extern const mp_obj_type_t machine_adc_type;
3232
extern const mp_obj_type_t machine_dac_type;
33-
extern const mp_obj_type_t machine_hw_i2c_type;
33+
extern const mp_obj_type_t machine_i2c_type;
3434
extern const mp_obj_type_t machine_led_type;
3535
extern const mp_obj_type_t machine_pin_type;
3636
extern const mp_obj_type_t machine_pwm_type;

0 commit comments

Comments
 (0)