diff options
author | Damien George <damien@micropython.org> | 2020-09-16 13:37:31 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2020-10-01 12:57:10 +1000 |
commit | aaed33896b0fec67a0e2ec7daf3fe908253d8cf7 (patch) | |
tree | c678d61c865681295ec08dc6137f7e266598f39c /extmod | |
parent | c35deb2625efc877b3a0d03d5654e27232b2d101 (diff) | |
download | micropython-aaed33896b0fec67a0e2ec7daf3fe908253d8cf7.tar.gz micropython-aaed33896b0fec67a0e2ec7daf3fe908253d8cf7.zip |
extmod/machine_i2c: Remove "id" arg in SoftI2C constructor.
The SoftI2C constructor is now used soley to create SoftI2C instances, it
can no longer delegate to create a hardware-based I2C instance.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'extmod')
-rw-r--r-- | extmod/machine_i2c.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/extmod/machine_i2c.c b/extmod/machine_i2c.c index 8aad001f1e..9203f16f6d 100644 --- a/extmod/machine_i2c.c +++ b/extmod/machine_i2c.c @@ -325,21 +325,6 @@ STATIC void machine_i2c_obj_init_helper(machine_i2c_obj_t *self, size_t n_args, } STATIC mp_obj_t mp_machine_soft_i2c_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) { - // check the id argument, if given - if (n_args > 0) { - if (args[0] != MP_OBJ_NEW_SMALL_INT(-1)) { - #if defined(MICROPY_PY_MACHINE_I2C_MAKE_NEW) - // dispatch to port-specific constructor - extern mp_obj_t MICROPY_PY_MACHINE_I2C_MAKE_NEW(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args); - return MICROPY_PY_MACHINE_I2C_MAKE_NEW(type, n_args, n_kw, args); - #else - mp_raise_ValueError(MP_ERROR_TEXT("invalid I2C peripheral")); - #endif - } - --n_args; - ++args; - } - // create new soft I2C object machine_i2c_obj_t *self = m_new_obj(machine_i2c_obj_t); self->base.type = &mp_machine_soft_i2c_type; |