June 2017
Intermediate to advanced
478 pages
13h 14m
English
Most systems have an RTC that can generate alarm interruptions up to 24 hours in the future. If so, the directory /sys/class/rtc/rtc0 will exist. It should contain the wakealarm file. Writing a number to wakealarm will cause it to generate an alarm that number of seconds later. If you also enable wake up events from rtc, it will resume a suspended device. For example, this would wake the system up in 30 seconds:
# cd /sys/devices/platform/pmic_rtc.1/rtc/rtc0# echo “+30” > wakealarm# echo “enabled” > power/wakeup
Read now
Unlock full access