pub struct IsrCriticalSection(_);

Implementations§

Constructs a new IsrCriticalSection instance

Disables all interrupts for the lifetime of the returned guard instance. This method supports nesting in that is safe to be called multiple times. This method is also safe to call from ISR routines.

NOTE: On dual-core esp32* chips, interrupts will be disabled only on one of the cores (the one where IsrCriticalSection::enter is called), while the other core will continue its execution. Moreover, if the same IsrCriticalSection instance is shared across multiple threads, where some of these happen to be scheduled on the second core (which has its interrupts enabled), the second core will then spinlock (busy-wait) in IsrCriticalSection::enter, until the first CPU releases the critical section and re-enables its interrupts. The second core will then - in turn - disable its interrupts and own the spinlock.

For more information, refer to https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/freertos-smp.html#critical-sections

Trait Implementations§

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.