nrf5/i2c: Updating i2c module to new new hal api, as master is initialized with its own init function.

This commit is contained in:
Glenn Ruben Bakke 2017-01-28 23:46:31 +01:00
parent 97a3fd4f3a
commit 1421ca4adc

View File

@ -99,7 +99,7 @@ STATIC mp_obj_t machine_i2c_make_new(const mp_obj_type_t *type, size_t n_args, s
int i2c_id = i2c_find(args[ARG_NEW_id].u_obj); int i2c_id = i2c_find(args[ARG_NEW_id].u_obj);
const machine_i2c_obj_t *self = &machine_i2c_obj[i2c_id]; const machine_i2c_obj_t *self = &machine_i2c_obj[i2c_id];
hal_twi_init(self->i2c->instance, &self->i2c->init); hal_twi_master_init(self->i2c->instance, &self->i2c->init);
return MP_OBJ_FROM_PTR(self); return MP_OBJ_FROM_PTR(self);
} }