Herzog Library 00.00.01  rel_libdev.herzog.00.00.01.10606
Data Structures | Macros | Functions
rtc_sfrs.h File Reference

Go to the source code of this file.

Data Structures

struct  RTC_SFRS_t
 A structure to represent Special Function Registers for RTC. More...
 
struct  RTC_TRIM_SFRS_t
 A structure to represent Special Function Registers for RTC trim. More...
 

Macros

#define E_RTC_MAX_COUNT   0x0003FFFF
 
#define RTC_SFRS   ((__IO RTC_SFRS_t *) (0x50000040))
 The starting address of RTC SFRS. More...
 
#define RTC_TRIM_SFRS   ((__IO RTC_TRIM_SFRS_t *) (0x5001800B))
 The starting address of RTC TRIM SFRS. More...
 

Functions

static __INLINE void f_RTC_Enable (void)
 Enable RTC timers. More...
 
static __INLINE void f_RTC_Disable (void)
 Disable RTC timers. More...
 
static __INLINE void f_RTC_Unlock (void)
 Unlock RTC configuration mode. More...
 
static __INLINE void f_RTC_Lock (void)
 Lock RTC configuration mode. More...
 
static __INLINE void f_RTC_EnableAlarmIRQ (void)
 Enable RTC alarm interrupt. More...
 
static __INLINE void f_RTC_DisableAlarmIRQ (void)
 Disable RTC alarm interrupt. More...
 
static __INLINE void f_RTC_EnableOverflowIRQ (void)
 Enable RTC overflow interrupt. More...
 
static __INLINE void f_RTC_DisableOverflowIRQ (void)
 Disable RTC overflow interrupt. More...
 
static __INLINE uint8_t f_RTC_IsOverflow (void)
 Check if RTC overflow occured. More...
 
static __INLINE uint8_t f_RTC_IsAlarm0 (void)
 Check if RTC alarm0 detected. More...
 
static __INLINE uint8_t f_RTC_IsAlarm1 (void)
 Check if RTC alarm1 detected. More...
 
static __INLINE uint32_t f_RTC_GetCurrentCounter (void)
 Read RTC current counter. More...
 
static __INLINE void f_RTC_SetCurrentCounter (uint32_t val)
 Set RTC current counter. More...
 
static __INLINE uint32_t f_RTC_GetAlarm0Counter (void)
 Read RTC alarm 0 counter. More...
 
static __INLINE void f_RTC_SetAlarm0Counter (uint32_t val)
 Set RTC alarm 0 counter. More...
 
static __INLINE uint32_t f_RTC_GetAlarm1Counter (void)
 Read RTC alarm 1 counter. More...
 
static __INLINE void f_RTC_SetAlarm1Counter (uint32_t val)
 Set RTC alarm 1 counter. More...
 
static __INLINE void f_RTC_SetRTCTrim (uint8_t val)
 Set RTC trim setting. More...
 

Detailed Description

This file is proprietary to Indie Semiconductor. All rights reserved. Reproduction or distribution, in whole or in part, is forbidden except by express written permission of Indie Semiconductor.

Macro Definition Documentation

#define E_RTC_MAX_COUNT   0x0003FFFF
#define RTC_SFRS   ((__IO RTC_SFRS_t *) (0x50000040))

The starting address of RTC SFRS.

#define RTC_TRIM_SFRS   ((__IO RTC_TRIM_SFRS_t *) (0x5001800B))

The starting address of RTC TRIM SFRS.

Function Documentation

static __INLINE void f_RTC_Disable ( void  )
static

Disable RTC timers.

static __INLINE void f_RTC_DisableAlarmIRQ ( void  )
static

Disable RTC alarm interrupt.

static __INLINE void f_RTC_DisableOverflowIRQ ( void  )
static

Disable RTC overflow interrupt.

static __INLINE void f_RTC_Enable ( void  )
static

Enable RTC timers.

static __INLINE void f_RTC_EnableAlarmIRQ ( void  )
static

Enable RTC alarm interrupt.

static __INLINE void f_RTC_EnableOverflowIRQ ( void  )
static

Enable RTC overflow interrupt.

static __INLINE uint32_t f_RTC_GetAlarm0Counter ( void  )
static

Read RTC alarm 0 counter.

static __INLINE uint32_t f_RTC_GetAlarm1Counter ( void  )
static

Read RTC alarm 1 counter.

static __INLINE uint32_t f_RTC_GetCurrentCounter ( void  )
static

Read RTC current counter.

static __INLINE uint8_t f_RTC_IsAlarm0 ( void  )
static

Check if RTC alarm0 detected.

static __INLINE uint8_t f_RTC_IsAlarm1 ( void  )
static

Check if RTC alarm1 detected.

static __INLINE uint8_t f_RTC_IsOverflow ( void  )
static

Check if RTC overflow occured.

static __INLINE void f_RTC_Lock ( void  )
static

Lock RTC configuration mode.

static __INLINE void f_RTC_SetAlarm0Counter ( uint32_t  val)
static

Set RTC alarm 0 counter.

static __INLINE void f_RTC_SetAlarm1Counter ( uint32_t  val)
static

Set RTC alarm 1 counter.

static __INLINE void f_RTC_SetCurrentCounter ( uint32_t  val)
static

Set RTC current counter.

static __INLINE void f_RTC_SetRTCTrim ( uint8_t  val)
static

Set RTC trim setting.

static __INLINE void f_RTC_Unlock ( void  )
static

Unlock RTC configuration mode.