rust-embedded / riscv

Low level access to RISC-V processors
822 stars 160 forks source link

`riscv`: support for S-mode #163

Closed romancardenas closed 9 months ago

romancardenas commented 9 months ago

This PR solves #114

Now, crate::interrupt has machine and supervisor modules for M and S mode, respectively. A new feature s-mode reexports the content of the appropriate module in crate::interrupt. I also modified how the critical section is implemented depending on whether the s-mode feature has been selected.