diff --git a/sys/arduino/include/arduino.hpp b/sys/arduino/include/arduino.hpp index 782b8685d8..9117bfa74f 100644 --- a/sys/arduino/include/arduino.hpp +++ b/sys/arduino/include/arduino.hpp @@ -23,6 +23,7 @@ extern "C" { #include +#include "irq.h" #include "periph/gpio.h" #include "arduino_board.h" } @@ -165,5 +166,21 @@ int analogRead(int pin); void analogWrite(int pin, int value); #endif +/** + * @brief Enables interrupts + */ +static inline void interrupts(void) +{ + irq_enable(); +} + +/** + * @brief Disables interrupts + */ +static inline void noInterrupts(void) +{ + irq_disable(); +} + #endif /* ARDUINO_HPP */ /** @} */