You've already forked ArduinoLowPower
mirror of
https://github.com/arduino-libraries/ArduinoLowPower.git
synced 2025-10-16 02:46:40 +03:00
[ARC32] RTC wakeup from idle() works
code from https://github.com/bigdinotech/Arduino101Power/
This commit is contained in:
@@ -8,10 +8,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef ARDUINO_ARCH_ARC32
|
||||
#include "include/arc32/power_states.h"
|
||||
#include "include/arc32/ss_power_states.h"
|
||||
#include "include/arc32/qm_sensor_regs.h"
|
||||
#include "include/arc32/qm_soc_regs.h"
|
||||
#include "include/arc32/defines.h"
|
||||
#endif
|
||||
|
||||
#ifdef ARDUINO_ARCH_SAMD
|
||||
@@ -24,15 +21,28 @@ class ArduinoLowPowerClass {
|
||||
public:
|
||||
void idle(void);
|
||||
void idle(uint32_t millis);
|
||||
void idle(int millis) {
|
||||
idle((uint32_t)millis);
|
||||
}
|
||||
|
||||
void sleep(void);
|
||||
void sleep(uint32_t millis);
|
||||
void sleep(int millis) {
|
||||
sleep((uint32_t)millis);
|
||||
}
|
||||
|
||||
void deepSleep(void);
|
||||
void deepSleep(uint32_t millis);
|
||||
void deepSleep(int millis) {
|
||||
deepSleep((uint32_t)millis);
|
||||
}
|
||||
|
||||
void attachInterruptWakeup(uint32_t pin, voidFuncPtr callback, uint32_t mode);
|
||||
|
||||
#ifdef ARDUINO_ARCH_ARC32
|
||||
void wakeFromSleepCallback(void);
|
||||
#endif
|
||||
|
||||
private:
|
||||
#ifdef ARDUINO_ARCH_SAMD
|
||||
void setAlarmIn(uint32_t millis);
|
||||
@@ -41,18 +51,20 @@ class ArduinoLowPowerClass {
|
||||
#endif
|
||||
|
||||
#ifdef ARDUINO_ARCH_ARC32
|
||||
void ss_power_soc_lpss_enable();
|
||||
void ss_power_soc_lpss_disable();
|
||||
void ss_power_cpu_ss1(const ss_power_cpu_ss1_mode_t mode);
|
||||
void ss_power_cpu_ss2();
|
||||
void ss_power_soc_sleep_restore();
|
||||
void ss_power_soc_deep_sleep_restore();
|
||||
void ss_power_sleep_wait();
|
||||
void power_soc_set_ss_restore_flag();
|
||||
void power_soc_sleep();
|
||||
void power_soc_deep_sleep();
|
||||
void setAlarmIn(uint32_t millis);
|
||||
#define RTC_ALARM_WAKEUP 0xFF
|
||||
void wakeFromDoze();
|
||||
void switchToHybridOscillator();
|
||||
void switchToCrystalOscillator();
|
||||
void attachWakeInterruptRTC(void (*userCallBack)());
|
||||
void turnOffUSB();
|
||||
void turnOnUSB();
|
||||
void setRTCCMR(int milliseconds);
|
||||
uint32_t readRTC_CCVR();
|
||||
bool isSleeping = false;
|
||||
uint32_t millisToRTCTicks(int milliseconds);
|
||||
void enableRTCInterrupt();
|
||||
void x86_C2Request();
|
||||
void (*pmCB)();
|
||||
#define RTC_ALARM_WAKEUP 0xFF
|
||||
#define RESET_BUTTON_WAKEUP 0xFE
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user