Type Alias shared_bus::CortexMMutex

source ·
pub type CortexMMutex<T> = Mutex<RefCell<T>>;
Expand description

Alias for a Cortex-M mutex.

Based on cortex_m::interrupt::Mutex. This mutex works by disabling interrupts while the mutex is locked.

This type is only available with the cortex-m feature.

Aliased Type§

struct CortexMMutex<T> { /* private fields */ }

Trait Implementations§

source§

impl<T> BusMutex for CortexMMutex<T>

§

type Bus = T

The actual bus that is wrapped inside this mutex.
source§

fn create(v: T) -> Self

Create a new mutex of this type.
source§

fn lock<R, F: FnOnce(&mut Self::Bus) -> R>(&self, f: F) -> R

Lock the mutex and give a closure access to the bus inside.