You've already forked ArduinoLowPower
mirror of
https://github.com/arduino-libraries/ArduinoLowPower.git
synced 2025-10-16 02:46:40 +03:00
Make the library compatible with both API and non API cores (#35)
Fixes https://github.com/arduino/ArduinoCore-samd/issues/578
This commit is contained in:
@@ -18,6 +18,12 @@
|
||||
|
||||
#define RTC_ALARM_WAKEUP 0xFF
|
||||
|
||||
#ifdef ARDUINO_API_VERSION
|
||||
using irq_mode = PinStatus;
|
||||
#else
|
||||
using irq_mode = uint32_t;
|
||||
#endif
|
||||
|
||||
//typedef void (*voidFuncPtr)( void ) ;
|
||||
typedef void (*onOffFuncPtr)( bool ) ;
|
||||
|
||||
@@ -59,7 +65,7 @@ class ArduinoLowPowerClass {
|
||||
deepSleep((uint32_t)millis);
|
||||
}
|
||||
|
||||
void attachInterruptWakeup(uint32_t pin, voidFuncPtr callback, uint32_t mode);
|
||||
void attachInterruptWakeup(uint32_t pin, voidFuncPtr callback, irq_mode mode);
|
||||
|
||||
#ifdef BOARD_HAS_COMPANION_CHIP
|
||||
void companionLowPowerCallback(onOffFuncPtr callback) {
|
||||
|
Reference in New Issue
Block a user