|
libnds
|
Utilities to read and write the real time clock from the ARM7. More...
Functions | |
| void | initClockIRQ (void) |
| Initialize the RTC and setup the RTC interrupt to update the time. | |
| void | initClockIRQTimer (int timer) |
| Initialize the RTC and setup a timer interrupt to update the time. | |
| void | resyncClock (void) |
| Reads RTC registers and updates the internal time of libnds. | |
| void | rtcTimeAndDateGet (rtcTimeAndDate *rtc) |
| Fills the provided rtcTimeAndDate structure with the current time and date. | |
| int | rtcTimeAndDateSet (rtcTimeAndDate *rtc) |
| Saves the current time and date to the provided rtcTimeAndDate structure. | |
| void | rtcTimeGet (rtcTime *rtc) |
| Fills the provided rtcTime structure with the current time. | |
| int | rtcTimeSet (rtcTime *rtc) |
| Sets the current time to the provided rtcTime structure. | |
Utilities to read and write the real time clock from the ARM7.
| void initClockIRQ | ( | void | ) |
Initialize the RTC and setup the RTC interrupt to update the time.
| void initClockIRQTimer | ( | int | timer | ) |
Initialize the RTC and setup a timer interrupt to update the time.
Please, use LIBNDS_DEFAULT_TIMER_RTC as timer index unless you have a very good reason to not do so.
| timer | Timer index to use. |
| void rtcTimeAndDateGet | ( | rtcTimeAndDate * | rtc | ) |
Fills the provided rtcTimeAndDate structure with the current time and date.
| rtc | Pointer to the rtcTimeAndDate struct to fill. |
| int rtcTimeAndDateSet | ( | rtcTimeAndDate * | rtc | ) |
Saves the current time and date to the provided rtcTimeAndDate structure.
A returned value of 0 doesn't mean that the RTC registers were updated correctly, only that the checks previous to writing the RTC registers passed.
Note: Check the documentation of rtcOffset in struct tPERSONAL_DATA for additional information.
| rtc | Pointer to the rtcTimeAndDate struct with the new time and date. |
| void rtcTimeGet | ( | rtcTime * | rtc | ) |
| int rtcTimeSet | ( | rtcTime * | rtc | ) |
Sets the current time to the provided rtcTime structure.
A returned value of 0 doesn't mean that the RTC registers were updated correctly, only that the checks previous to writing the RTC registers passed.
Note: Check the documentation of rtcOffset in struct tPERSONAL_DATA for additional information.
| rtc | Pointer to the rtcTime struct with the new time. |