SDK4.0
This document shows Ameba SDK 4.0 APIs
|
rtc functions More...
Data Structures | |
struct | alarm_s |
Variables | |
uint32_t | yday |
uint32_t | hour |
uint32_t | min |
uint32_t | sec |
AmebaZ Only | |
typedef void(* | alarm_irq_handler) (void) |
typedef struct alarm_s | alarm_t |
u32 | rtc_set_alarm (alarm_t *alrm, alarm_irq_handler alarmHandler) |
Set the specified RTC Alarm and interrupt. More... | |
void | rtc_disable_alarm (void) |
Disable RTC Alarm and function. More... | |
Ameba Common | |
void | rtc_init (void) |
Initializes the RTC device, include clock, RTC registers and function. More... | |
void | rtc_free (void) |
Deinitializes the RTC device. More... | |
int | rtc_isenabled (void) |
This function tells whether RTC is enabled or not. More... | |
time_t | rtc_read (void) |
Get current timestamp in seconds from RTC. More... | |
void | rtc_write (time_t t) |
Set the specified timestamp in seconds to RTC. More... | |
rtc functions
void rtc_disable_alarm | ( | void | ) |
Disable RTC Alarm and function.
none |
none |
void rtc_free | ( | void | ) |
Deinitializes the RTC device.
none |
none |
void rtc_init | ( | void | ) |
Initializes the RTC device, include clock, RTC registers and function.
none |
none |
int rtc_isenabled | ( | void | ) |
This function tells whether RTC is enabled or not.
none |
1 | RTC is enable. |
0 | RTC is disable. |
time_t rtc_read | ( | void | ) |
Get current timestamp in seconds from RTC.
none |
The current timestamp in seconds which is calculated from 1970.1.1 00:00:00. |
u32 rtc_set_alarm | ( | alarm_t * | alrm, |
alarm_irq_handler | alarmHandler | ||
) |
Set the specified RTC Alarm and interrupt.
alarm | alarm object define in application software. |
alarmHandler | alarm interrupt callback function. |
status |
|
void rtc_write | ( | time_t | t | ) |
Set the specified timestamp in seconds to RTC.
t | Seconds from 1970.1.1 00:00:00 to specified data and time which is to be set. |
none |