Function riot_wrappers::saul::registration::register_and_then
source · pub fn register_and_then<DEV, DRIV>(
driver: &Driver<DEV, DRIV>,
device: &DEV,
name: Option<&CStr>,
f: impl FnOnce() -> !
) -> !
Available on
riot_module_saul
only.Expand description
Hook the registration in with the global SAUL list
Compared to Registration::register_static()
, this is convenient for threads that run
forever and which just need a reference to move into an infinitely executing closure to get the
same guarantees as from a static reference.