sys/arduino: add interrupts/noInterrupts
This fixes the error: $ BOARD=arduino-mega2560 make -C tests/pkg_arduino_sdi_12/ [...] [...]/RIOT/build/pkg/arduino_sdi_12/src/SDI12.cpp:379:7: error: ‘interrupts’ was not declared in this scope
This commit is contained in:
parent
c965ce3de6
commit
a651315fbe
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include "irq.h"
|
||||||
#include "periph/gpio.h"
|
#include "periph/gpio.h"
|
||||||
#include "arduino_board.h"
|
#include "arduino_board.h"
|
||||||
}
|
}
|
||||||
@ -165,5 +166,21 @@ int analogRead(int pin);
|
|||||||
void analogWrite(int pin, int value);
|
void analogWrite(int pin, int value);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables interrupts
|
||||||
|
*/
|
||||||
|
static inline void interrupts(void)
|
||||||
|
{
|
||||||
|
irq_enable();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Disables interrupts
|
||||||
|
*/
|
||||||
|
static inline void noInterrupts(void)
|
||||||
|
{
|
||||||
|
irq_disable();
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* ARDUINO_HPP */
|
#endif /* ARDUINO_HPP */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user