From 6fbdeb6baf0b23d85e15ad16cde3464fadd967b1 Mon Sep 17 00:00:00 2001 From: enriquezgarc Date: Fri, 2 Feb 2024 12:47:18 +0100 Subject: [PATCH] ports/psoc6/machine_i2c.c: Passing argument event as int. Signed-off-by: enriquezgarc --- ports/psoc6/machine_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/psoc6/machine_i2c.c b/ports/psoc6/machine_i2c.c index 60eb749d61f65..1dfd81fdf857c 100644 --- a/ports/psoc6/machine_i2c.c +++ b/ports/psoc6/machine_i2c.c @@ -254,7 +254,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(machine_i2c_slave_conf_tx_buffer_obj, machine_i static void i2c_irq_handler(void *callback_arg, cyhal_i2c_event_t event) { machine_i2c_obj_t *self = callback_arg; - mp_sched_schedule(self->callback, MP_OBJ_FROM_PTR(self)); + mp_sched_schedule(self->callback, mp_obj_new_int(event)); } STATIC mp_obj_t machine_i2c_slave_irq(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {