update package
All checks were successful
Rust/va108xx-rs/pipeline/pr-main This commit looks good

- Add embassy example
- improve timer API
- restructure examples
- restructure and improve SPI
- Add REB1 M95M01 NVM module
This commit is contained in:
2024-09-18 15:07:29 +02:00
parent 405cc089c3
commit acb8b67ae7
40 changed files with 2197 additions and 673 deletions

View File

@ -15,7 +15,6 @@ pub mod time;
pub mod timer;
pub mod typelevel;
pub mod uart;
pub mod utility;
#[derive(Debug, Eq, Copy, Clone, PartialEq)]
pub enum FunSel {
@ -98,3 +97,21 @@ pub fn port_mux(
}
}
}
/// Enable a specific interrupt using the NVIC peripheral.
///
/// # Safety
///
/// This function is `unsafe` because it can break mask-based critical sections.
#[inline]
pub unsafe fn enable_interrupt(irq: pac::Interrupt) {
unsafe {
cortex_m::peripheral::NVIC::unmask(irq);
}
}
/// Disable a specific interrupt using the NVIC peripheral.
#[inline]
pub fn disable_interrupt(irq: pac::Interrupt) {
cortex_m::peripheral::NVIC::mask(irq);
}