macro_rules! init_ask_driver {
($tx:ty, $rx:ty, $ptt:ty) => { ... };
}Expand description
Declares a static global ASK_DRIVER instance protected by a critical_section mutex.
This macro creates a static singleton ASK_DRIVER suitable for use in
interrupt-based environments, where both the main thread and an ISR need
to safely access the shared driver state.
§Arguments
$tx: The concrete type of the TX pin (must implementOutputPin)$rx: The concrete type of the RX pin (must implementInputPin)$ptt: The concrete type of the PRR pin (must implementOutputPin). NOTE: While you might not have a PTT pin, it is imperative that you pass a type here.
§Example
use ask433::init_ask_driver;
use embedded_hal_mock::eh1::digital::{Mock as Pin};
init_ask_driver!(Pin, Pin, Pin);