Skip to content

Commit 4fb4df2

Browse files
committed
changes parameter name.
1 parent ed88473 commit 4fb4df2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

micropy_updates/esp32/machine_i2c.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -589,10 +589,10 @@
589589
mp_obj_t i2c_device_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) {
590590

591591
// Parse args
592-
enum { ARG_bus, ARG_device_id, ARG_reg_bits };
592+
enum { ARG_bus, ARG_dev_id, ARG_reg_bits };
593593
static const mp_arg_t allowed_args[] = {
594594
{ MP_QSTR_bus, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_OBJ },
595-
{ MP_QSTR_device_id, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT },
595+
{ MP_QSTR_dev_id, MP_ARG_KW_ONLY | MP_ARG_REQUIRED | MP_ARG_INT },
596596
{ MP_QSTR_reg_bits, MP_ARG_KW_ONLY | MP_ARG_INT, { .u_int = 8 } }
597597
};
598598

@@ -611,7 +611,7 @@
611611
self->base.type = &mp_machine_hw_i2c_device_type;
612612

613613
self->bus = (mp_machine_hw_i2c_bus_obj_t *)args[ARG_bus].u_obj;
614-
self->device_id = (uint16_t)args[ARG_device_id].u_int;
614+
self->device_id = (uint16_t)args[ARG_dev_id].u_int;
615615
self->reg_bits = (uint8_t)args[ARG_reg_bits].u_int;
616616

617617
self->bus->device_count++;

0 commit comments

Comments
 (0)