I can't find any examples, and this format was taken from a closed issue #188 however my ISR is not being pointed to in the vector table. Or to be more precise the vector table is not being modified.
pub const microzig = @import("microzig");
const regs = microzig.chip.peripherals;
pub var acceleration_data_ready: bool = false;
fn isr_for_accelerometer_acceleration_data() callconv(.C) void {
if (regs.GPIOTE.EVENTS_IN[0].read().EVENTS_IN != .Generated) return;
@atomicStore(bool, &acceleration_data_ready, true, .monotonic);
regs.GPIOTE.EVENTS_IN[0].write(.{.EVENTS_IN = .NotGenerated}); // reset the interrupt
}
// 3. Register it with Microzig
pub const microzig_options = .{
.interrupts = .{
.GPIOTE = microzig.interrupt.Handler {
.C = isr_for_accelerometer_acceleration_data
}
},
};
What is the correct way to register an ISR for nRF microcontrollers?
I can't find any examples, and this format was taken from a closed issue #188 however my ISR is not being pointed to in the vector table. Or to be more precise the vector table is not being modified.
What is the correct way to register an ISR for nRF microcontrollers?