libdragon
|
Real-Time Clock Subsystem. More...
Macros | |
#define | JOYBUS_RTC_IDENTIFIER 0x1000 |
Joybus real-time clock identifier. More... | |
#define | JOYBUS_RTC_WRITE_BLOCK_DELAY 20 |
Duration (in milliseconds) to wait after writing a Joybus RTC block. More... | |
#define | JOYBUS_RTC_WRITE_FINISHED_DELAY 500 |
Duration (in milliseconds) to wait after setting Joybus RTC time. More... | |
#define | JOYBUS_RTC_STATUS_RUNNING 0x00 |
The Joybus RTC is running. More... | |
#define | JOYBUS_RTC_STATUS_STOPPED 0x80 |
The Joybus RTC is stopped. More... | |
#define | JOYBUS_RTC_CONTROL_MODE_SET 0x0004 |
Control mode for setting the Joybus RTC date/time. More... | |
#define | JOYBUS_RTC_CONTROL_MODE_RUN 0x0300 |
Control mode for normal operation of the Joybus RTC. More... | |
#define | RTC_GET_CACHE_INVALIDATE_TICKS (TICKS_PER_SECOND) |
Invalidate the most-recent RTC time cache after 1 second. | |
Enumerations | |
enum | rtc_type_t { RTC_NONE = 0 , RTC_JOYBUS = 1 , RTC_DD = 2 , RTC_UNKNOWN = -1 } |
Real-time clock detection values. More... | |
Functions | |
bool | rtc_init (void) |
High-level convenience helper to initialize the RTC subsystem. More... | |
void | rtc_close (void) |
Close the RTC Subsystem, disabling system hooks. More... | |
void | rtc_normalize_time (rtc_time_t *rtc_time) |
Calculate sane values for arbitrary time inputs. More... | |
bool | rtc_get (rtc_time_t *rtc_time) |
Read the current date/time from the real-time clock. More... | |
bool | rtc_set (rtc_time_t *write_time) |
High-level convenience helper to set the RTC date/time. More... | |
bool | rtc_is_writable (void) |
Determine whether the RTC supports writing the time. More... | |
Real-Time Clock Subsystem.