libctr9
Nintendo 3DS ARM9 library
ctr_rtc.h File Reference
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  ctr_rtc_data
 

Functions

void ctr_rtc_init (void)
 Initializes the data used for RTC access. More...
 
ctr_rtc_data ctr_rtc_gettime (void)
 Returns the data read from the RTC. More...
 

Function Documentation

ctr_rtc_data ctr_rtc_gettime ( void  )

Returns the data read from the RTC.

The underlying RTC returns data in BCD format, but this function converts the BCD to binary.

Precondition
ctr_rtc_init has been called at least once.
Returns
The binary representation of the RTC BCD data.
void ctr_rtc_init ( void  )

Initializes the data used for RTC access.

Call this function at least once before trying to get the RTC time. It is safe to call this function multiple times.