summaryrefslogtreecommitdiff
path: root/extmod/machine_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'extmod/machine_i2c.c')
-rw-r--r--extmod/machine_i2c.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/extmod/machine_i2c.c b/extmod/machine_i2c.c
index 8aad001f1..9203f16f6 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;