Skip to content

Commit 4e4ca6c

Browse files
committed
pybricks.iodevices.I2CDevice: Update type name.
We've been gradually introducing this pattern for newer classes, so be consistent about it.
1 parent 2dcc6af commit 4e4ca6c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

bricks/_common/sources.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ PYBRICKS_PYBRICKS_SRC_C = $(addprefix pybricks/,\
5757
hubs/pb_type_virtualhub.c \
5858
iodevices/pb_module_iodevices.c \
5959
iodevices/pb_type_iodevices_analogsensor.c \
60-
iodevices/pb_type_iodevices_i2cdevice.c \
60+
iodevices/pb_type_i2c_device.c \
6161
iodevices/pb_type_iodevices_lwp3device.c \
6262
iodevices/pb_type_iodevices_pupdevice.c \
6363
iodevices/pb_type_iodevices_xbox_controller.c \

pybricks/iodevices/iodevices.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ extern const mp_obj_type_t pb_type_iodevices_PUPDevice;
1414
extern const mp_obj_type_t pb_type_uart_device;
1515

1616
#if PYBRICKS_PY_IODEVICES_I2CDEVICE
17-
extern const mp_obj_type_t pb_type_iodevices_I2CDevice;
17+
extern const mp_obj_type_t pb_type_i2c_device;
1818
#endif
1919

2020
#if PYBRICKS_PY_PUPDEVICES

pybricks/iodevices/pb_module_iodevices.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ static const mp_rom_map_elem_t iodevices_globals_table[] = {
1313
{ MP_ROM_QSTR(MP_QSTR_PUPDevice), MP_ROM_PTR(&pb_type_iodevices_PUPDevice) },
1414
{ MP_ROM_QSTR(MP_QSTR_UARTDevice), MP_ROM_PTR(&pb_type_uart_device) },
1515
#if PYBRICKS_PY_IODEVICES_I2CDEVICE
16-
{ MP_ROM_QSTR(MP_QSTR_I2CDevice), MP_ROM_PTR(&pb_type_iodevices_I2CDevice) },
16+
{ MP_ROM_QSTR(MP_QSTR_I2CDevice), MP_ROM_PTR(&pb_type_i2c_device) },
1717
#endif
1818
#if PYBRICKS_PY_PUPDEVICES && PYBRICKS_PY_PUPDEVICES_REMOTE
1919
{ MP_ROM_QSTR(MP_QSTR_LWP3Device), MP_ROM_PTR(&pb_type_iodevices_LWP3Device) },

pybricks/iodevices/pb_type_iodevices_i2cdevice.c renamed to pybricks/iodevices/pb_type_i2c_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ static const mp_rom_map_elem_t locals_dict_table[] = {
283283
static MP_DEFINE_CONST_DICT(locals_dict, locals_dict_table);
284284

285285
// type(pybricks.iodevices.I2CDevice)
286-
MP_DEFINE_CONST_OBJ_TYPE(pb_type_iodevices_I2CDevice,
286+
MP_DEFINE_CONST_OBJ_TYPE(pb_type_i2c_device,
287287
MP_QSTR_I2CDevice,
288288
MP_TYPE_FLAG_NONE,
289289
make_new, make_new,

0 commit comments

Comments
 (0)