StuBS
|
Real Time Clock. More...
#include <machine/rtc.h>
Static Public Member Functions | |
static DateTime | getDateTime () |
Get current date and time. More... | |
Protected Types | |
enum | Interrupt { NONE = 0 , UPDATE = 1 << 4 , ALARM = 1 << 5 , PERIODIC = 1 << 6 } |
Possible Interrupt sources. More... | |
enum | PeriodicFrequency { FREQ_NONE = 0 , FREQ_8192HZ = 3 , FREQ_4096HZ = 4 , FREQ_2048HZ = 5 , FREQ_1024HZ = 6 , FREQ_512HZ = 7 , FREQ_256HZ = 8 , FREQ_128HZ = 9 , FREQ_64HZ = 10 , FREQ_32HZ = 11 , FREQ_16HZ = 12 , FREQ_8HZ = 13 , FREQ_4HZ = 14 , FREQ_2HZ = 15 } |
Frequencies for periodic interval. More... | |
Static Protected Member Functions | |
static void | setPeriodic (enum PeriodicFrequency freq) |
Set a periodic interrupt interval. More... | |
static void | setAlarm (uint8_t hour, uint8_t minute, uint8_t second) |
Set an alarm. More... | |
static void | receiveInterrupt (Interrupt i, bool enable) |
Enable or disable an interrupt source. More... | |
static Interrupt | getSource () |
Get the source of the last interrupt. More... | |
Real Time Clock.
|
protected |
|
protected |
Frequencies for periodic interval.
|
staticprotected |
Set a periodic interrupt interval.
freq | Frequency |
|
staticprotected |
Set an alarm.
hour | Hour |
minute | Minute |
second | Second |
|
staticprotected |
Enable or disable an interrupt source.
i | Interrupt source |
enable | true to enable source, false to disable it. |
|
staticprotected |
Get the source of the last interrupt.
|
static |
Get current date and time.