EmlaLockSafe
UsedInterrupts Class Reference

Class used to globally disable enable interrupts. More...

#include <UsedInterrupts.h>

Static Public Member Functions

static void attach ()
 attach the encoder pins to a interrupt More...
 
static void detach ()
 detach the interrupts More...
 
static void executeWithoutInterrupts (std::function< void(void)> f)
 Execute the passed function without interrupts. More...
 

Static Private Attributes

static bool interruptsAttached = false
 true if at attach() was called at least once More...
 

Detailed Description

Class used to globally disable enable interrupts.

The interrupts must e.g. disabled when accessing the SPI Filesystem

Member Function Documentation

◆ attach()

static void UsedInterrupts::attach ( )
inlinestatic

attach the encoder pins to a interrupt

◆ detach()

static void UsedInterrupts::detach ( )
inlinestatic

detach the interrupts

◆ executeWithoutInterrupts()

static void UsedInterrupts::executeWithoutInterrupts ( std::function< void(void)>  f)
inlinestatic

Execute the passed function without interrupts.

Parameters
ffunction / lambda which should be executed

Member Data Documentation

◆ interruptsAttached

bool UsedInterrupts::interruptsAttached = false
staticprivate

true if at attach() was called at least once

Author
Hugo3132

The documentation for this class was generated from the following files: