Mention how handlers are run when drivers are moved across cores (#1568)
This commit is contained in:
parent
ef290a9a78
commit
9acf72df33
@ -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(),
|
||||
|
||||
@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user