Closed romancardenas closed 1 year ago
As part of this issue, @steewbsd and I have been working on an optional feature that allow users to use a vectored interrupt handling mechanism for external interrupts. We opened a pull request with a proof of concept in PR #49
I've been studying the
riscv-rt
,e310x
ande310x-hal
crates for a while, and I'm currently exploring different interruption modes. As far as I know,riscv-rt
leaves you theMachineExternal
function for dealing with all the machine external interrupts. Thee310x
crate allows you to define specific interrupt handlers for each interrupt source (e.g., a GPIO) with theinterrupt
macro. However, I don't see a clear connection betweenMachineExternal
and these functions (I mean, which part of the code does the trick to identify the source and call the proper interrupt handler if exists).I managed to catch GPIO interruptions by defining a common
MachineExternal
function and analyzing the interrupt source, but I wonder if it's possible to define custom handlers for a given GPIO using theinterrupt
macro and forget about theMachineExternal
common handler.