Open Grazfather opened 2 weeks ago
sm_enable_interrupt uses this function, but if I have a PIO program that wants to wait for the interrupt, I need to re-write the function as below:
sm_enable_interrupt
fn get_irq_regs(irq: Irq) *volatile Irq.Regs { const PIO0 = microzig.chip.peripherals.PIO0; const irq_regs = @as(*volatile [2]Irq.Regs, @ptrCast(&PIO0.IRQ0_INTE)); return &irq_regs[@intFromEnum(irq)]; }
And this is hardcoded for PIO0. I can't even call get_regs because that method is also not public.
get_regs
sm_enable_interrupt
uses this function, but if I have a PIO program that wants to wait for the interrupt, I need to re-write the function as below:And this is hardcoded for PIO0. I can't even call
get_regs
because that method is also not public.