drone-cortex-m 0.7.0

Drone for ARM Cortex-M.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use core::ptr::write_volatile;
use futures::executor::Notify;

pub(in thread) struct NotifyIrq;

pub(in thread) const NOTIFY_IRQ: &NotifyIrq = &NotifyIrq;

const NVIC_STIR: usize = 0xE000_EF00;

impl Notify for NotifyIrq {
  fn notify(&self, number: usize) {
    unsafe { write_volatile(NVIC_STIR as *mut _, number) };
  }
}