RTCC - Real Timer Counter/Calendar
Description
Real Time Counter and Calendar (RTCC) Peripheral API.
This module contains functions to control the RTCC peripheral of Silicon Labs 32-bit MCUs and SoCs. The RTCC ensures timekeeping in low energy modes. The RTCC also includes a BCD calendar mode for easy time and date keeping.
Data Structures |
|
struct | RTCC_Init_TypeDef |
RTCC initialization structure.
|
|
struct | RTCC_CCChConf_TypeDef |
RTCC capture/compare channel configuration structure.
|
|
Functions |
|
uint32_t | RTCC_ChannelCompareValueGet (int ch) |
Get RTCC compare register value for selected channel.
|
|
void | RTCC_ChannelCompareValueSet (int ch, uint32_t value) |
Set RTCC compare register value for selected channel.
|
|
uint32_t | RTCC_ChannelCaptureValueGet (int ch) |
Get RTCC input capture register value for selected channel.
|
|
uint32_t | RTCC_ChannelCCVGet (int ch) |
Get RTCC capture/compare register value for selected channel.
|
|
void | RTCC_ChannelCCVSet (int ch, uint32_t value) |
Set RTCC capture/compare register value for selected channel.
|
|
uint32_t | RTCC_CombinedCounterGet (void) |
Get combined CNT/PRECNT register content.
|
|
uint32_t | RTCC_CounterGet (void) |
Get RTCC counter value.
|
|
void | RTCC_CounterSet (uint32_t value) |
Set RTCC CNT counter.
|
|
void | RTCC_Enable (bool enable) |
Enable/disable RTCC counting.
|
|
void | RTCC_Init (const RTCC_Init_TypeDef *init) |
Initialize RTCC.
|
|
void | RTCC_ChannelInit (int ch, RTCC_CCChConf_TypeDef const *confPtr) |
Configure the selected capture/compare channel of the RTCC.
|
|
void | RTCC_IntClear (uint32_t flags) |
Clear one or more pending RTCC interrupts.
|
|
void | RTCC_IntDisable (uint32_t flags) |
Disable one or more RTCC interrupts.
|
|
void | RTCC_IntEnable (uint32_t flags) |
Enable one or more RTCC interrupts.
|
|
uint32_t | RTCC_IntGet (void) |
Get pending RTCC interrupt flags.
|
|
uint32_t | RTCC_IntGetEnabled (void) |
Get enabled and pending RTCC interrupt flags.
|
|
void | RTCC_IntSet (uint32_t flags) |
Set one or more pending RTCC interrupts from SW.
|
|
void | RTCC_Lock (void) |
Lock RTCC registers.
|
|
uint32_t | RTCC_PreCounterGet (void) |
Get RTCC pre-counter value.
|
|
void | RTCC_PreCounterSet (uint32_t preCntVal) |
Set RTCC pre-counter value.
|
|
void | RTCC_Reset (void) |
Restore RTCC to its reset state.
|
|
void | RTCC_StatusClear (void) |
Clear the STATUS register.
|
|
uint32_t | RTCC_StatusGet (void) |
Get STATUS register value.
|
|
void | RTCC_SyncWait (void) |
Wait for the RTCC to complete all synchronization of register changes and commands.
|
|
void | RTCC_Start (void) |
Start RTCC counter.
|
|
void | RTCC_Stop (void) |
Stop the RTCC counter.
|
|
void | RTCC_Unlock (void) |
Unlock RTCC registers.
|
|
Macros |
|
#define | RTCC_INIT_DEFAULT |
Default RTCC initialization structure.
|
|
#define | RTCC_CH_INIT_COMPARE_DEFAULT |
Default RTCC channel output compare initialization structure.
|
|
#define | RTCC_CH_INIT_CAPTURE_DEFAULT |
Default RTCC channel input capture initialization structure.
|
|
#define | RTCC_CH_VALID (ch) ((unsigned)(ch) < RTCC_CC_NUM) |
Number of RTCC capture/compare channels.
|
|
Typedefs |
|
typedef uint8_t | RTCC_PRSSel_TypeDef |
PRS channel number.
|
|
Enumerations |
|
enum |
RTCC_CntPresc_TypeDef
{
rtccCntPresc_1 = _RTCC_CFG_CNTPRESC_DIV1, rtccCntPresc_2 = _RTCC_CFG_CNTPRESC_DIV2, rtccCntPresc_4 = _RTCC_CFG_CNTPRESC_DIV4, rtccCntPresc_8 = _RTCC_CFG_CNTPRESC_DIV8, rtccCntPresc_16 = _RTCC_CFG_CNTPRESC_DIV16, rtccCntPresc_32 = _RTCC_CFG_CNTPRESC_DIV32, rtccCntPresc_64 = _RTCC_CFG_CNTPRESC_DIV64, rtccCntPresc_128 = _RTCC_CFG_CNTPRESC_DIV128, rtccCntPresc_256 = _RTCC_CFG_CNTPRESC_DIV256, rtccCntPresc_512 = _RTCC_CFG_CNTPRESC_DIV512, rtccCntPresc_1024 = _RTCC_CFG_CNTPRESC_DIV1024, rtccCntPresc_2048 = _RTCC_CFG_CNTPRESC_DIV2048, rtccCntPresc_4096 = _RTCC_CFG_CNTPRESC_DIV4096, rtccCntPresc_8192 = _RTCC_CFG_CNTPRESC_DIV8192, rtccCntPresc_16384 = _RTCC_CFG_CNTPRESC_DIV16384, rtccCntPresc_32768 = _RTCC_CFG_CNTPRESC_DIV32768 } |
Counter prescaler selection.
|
|
enum |
RTCC_PrescMode_TypeDef
{
rtccCntTickPresc = _RTCC_CFG_CNTTICK_PRESC, rtccCntTickCCV0Match = _RTCC_CFG_CNTTICK_CCV0MATCH } |
Prescaler mode of the RTCC counter.
|
|
enum |
RTCC_CapComChMode_TypeDef
{
rtccCapComChModeOff = _RTCC_CC_CTRL_MODE_OFF, rtccCapComChModeCapture = _RTCC_CC_CTRL_MODE_INPUTCAPTURE, rtccCapComChModeCompare = _RTCC_CC_CTRL_MODE_OUTPUTCOMPARE } |
Capture/Compare channel mode.
|
|
enum |
RTCC_CompMatchOutAction_TypeDef
{
rtccCompMatchOutActionPulse = _RTCC_CC_CTRL_CMOA_PULSE, rtccCompMatchOutActionToggle = _RTCC_CC_CTRL_CMOA_TOGGLE, rtccCompMatchOutActionClear = _RTCC_CC_CTRL_CMOA_CLEAR, rtccCompMatchOutActionSet = _RTCC_CC_CTRL_CMOA_SET } < |