Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rp2xxx: Make get_irq_regs public #283

Open
Grazfather opened this issue Nov 9, 2024 · 0 comments
Open

rp2xxx: Make get_irq_regs public #283

Grazfather opened this issue Nov 9, 2024 · 0 comments

Comments

@Grazfather
Copy link
Contributor

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:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant