core/time/rtc.h File Reference
Go to the source code of this file.
Data Structures |
struct | rtc_time_t |
Defines |
#define | RTC_TIME_BASE 0xe0024020 |
#define | RTC_ALARM_BASE 0xe0024060 |
#define | IMSEC 0x00000001 |
#define | IMMIN 0x00000002 |
#define | IMHOUR 0x00000004 |
#define | IMDOM 0x00000008 |
#define | IMDOW 0x00000010 |
#define | IMDOY 0x00000020 |
#define | IMMON 0x00000040 |
#define | IMYEAR 0x00000080 |
#define | AMRSEC 0x00000001 |
#define | AMRMIN 0x00000002 |
#define | AMRHOUR 0x00000004 |
#define | AMRDOM 0x00000008 |
#define | AMRDOW 0x00000010 |
#define | AMRDOY 0x00000020 |
#define | AMRMON 0x00000040 |
#define | AMRYEAR 0x00000080 |
#define | PREINT_RTC ((Fpclk/32768)-1) |
#define | PREFRAC_RTC (Fpclk-((PREINT_RTC+1)*32768)) |
#define | ILR_RTCCIF 0x01 |
#define | ILR_RTCALF 0x02 |
#define | CCR_CLKEN 0x01 |
#define | CCR_CTCRST 0x02 |
#define | CCR_CLKSRC 0x10 |
Functions |
void | rtc_init (void) |
void | rtc_start (void) |
void | rtc_stop (void) |
void | rtc_clear_tick_counter (void) |
void | rtc_set_time (const rtc_time_t *p_time) |
void | rtc_get_time (rtc_time_t *p_time) |
void | rtc_set_alarm (const rtc_time_t *p_time) |
void | rtc_set_alarm_mask (uint32_t mask) |
Variables |
volatile uint32_t | rtc_alarm_active |
Detailed Description
Definitions for the real time clock (RTC) driver.
Definition in file rtc.h.
Function Documentation
void rtc_clear_tick_counter |
( |
void |
|
) |
|
Reset the RTC's tick counter
Definition at line 85 of file rtc.c.
Get the real time clock (RTC).
- Parameters:
-
| p_time | Pointer to a structure that will receive the current clock values. |
Definition at line 132 of file rtc.c.
Initialize the real time clock (RTC).
Definition at line 45 of file rtc.c.
Set the real time clock (RTC) alarm.
- Parameters:
-
| p_time | Pointer to the new alarm values. |
Definition at line 114 of file rtc.c.
void rtc_set_alarm_mask |
( |
uint32_t |
mask |
) |
|
Set the alarm mask of the real time clock (RTC).
- Parameters:
-
Definition at line 150 of file rtc.c.
Set the real time clock (RTC).
- Parameters:
-
| p_time | Pointer to the new clock values. |
Definition at line 96 of file rtc.c.
Start the real time clock (RTC).
Definition at line 66 of file rtc.c.
Stop the real time clock (RTC).
Definition at line 76 of file rtc.c.