Mention how handlers are run when drivers are moved across cores (#1568)

This commit is contained in:
Scott Mabin 2024-05-21 09:22:35 +01:00 committed by GitHub
parent ef290a9a78
commit 9acf72df33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -64,6 +64,10 @@ mod riscv;
mod xtensa;
/// An interrupt handler
#[cfg_attr(
multi_core,
doc = "**Note**: Interrupts are handled on the core they were setup on, if a driver is initialized on core 0, and moved to core 1, core 0 will still handle the interrupt."
)]
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct InterruptHandler {
f: extern "C" fn(),

View File

@ -113,7 +113,7 @@ mod tests {
#[test]
async fn test_a_pin_can_wait(_ctx: Context<'static>) {
let mut first = Input::new( unsafe { GpioPin::<0>::steal() } , Pull::Down);
let mut first = Input::new(unsafe { GpioPin::<0>::steal() }, Pull::Down);
embassy_futures::select::select(
first.wait_for_rising_edge(),
@ -226,6 +226,5 @@ mod tests {
assert_eq!(io2.is_low(), true);
assert_eq!(io4.is_low(), true);
}
}