rp2: Fix crash in a pin.irq handler.

When accessing the argument of the irq function.
This commit is contained in:
robert-hh 2023-01-22 17:49:10 +01:00
parent 4f3780a156
commit d4a4cde42e

View File

@ -423,7 +423,7 @@ STATIC machine_pin_irq_obj_t *machine_pin_get_irq(mp_hal_pin_obj_t pin) {
irq = m_new_obj(machine_pin_irq_obj_t);
irq->base.base.type = &mp_irq_type;
irq->base.methods = (mp_irq_methods_t *)&machine_pin_irq_methods;
irq->base.parent = MP_OBJ_FROM_PTR(&machine_pin_cpu_pins[pin]);
irq->base.parent = MP_OBJ_FROM_PTR(machine_pin_cpu_pins[pin]);
irq->base.handler = mp_const_none;
irq->base.ishard = false;
MP_STATE_PORT(machine_pin_irq_obj[pin]) = irq;