EFR32 Mighty Gecko 13 Software Documentation
efr32mg13-doc-5.1.2
|
Real Time Counter (RTCC) peripheral API.
Copyright 2016 Silicon Laboratories, Inc. http://www.silabs.com
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no obligation to support this Software. Silicon Labs is providing the Software "AS IS", with no express or implied warranties of any kind, including, but not limited to, any implied warranties of merchantability or fitness for any particular purpose or warranties against infringement of any proprietary rights of a third party.
Silicon Labs will not be liable for any consequential, incidental, or special damages, or any other relief, or for any claim by any third party, arising from your use of this Software.
Definition in file em_rtcc.h.
Go to the source code of this file.
Data Structures | |
struct | RTCC_CCChConf_TypeDef |
struct | RTCC_Init_TypeDef |
Macros | |
#define | RTCC_CH_INIT_CAPTURE_DEFAULT |
#define | RTCC_CH_INIT_COMPARE_DEFAULT |
#define | RTCC_CH_VALID(ch) ( ( ch ) < 3 ) |
#define | RTCC_INIT_DEFAULT |
Enumerations | |
enum | RTCC_CapComChMode_TypeDef { rtccCapComChModeOff = _RTCC_CC_CTRL_MODE_OFF, rtccCapComChModeCapture = _RTCC_CC_CTRL_MODE_INPUTCAPTURE, rtccCapComChModeCompare = _RTCC_CC_CTRL_MODE_OUTPUTCOMPARE } |
enum | RTCC_CntMode_TypeDef { rtccCntModeNormal = _RTCC_CTRL_CNTTICK_PRESC, rtccCntModeCalendar = _RTCC_CTRL_CNTTICK_CCV0MATCH } |
enum | RTCC_CntPresc_TypeDef { rtccCntPresc_1 = _RTCC_CTRL_CNTPRESC_DIV1, rtccCntPresc_2 = _RTCC_CTRL_CNTPRESC_DIV2, rtccCntPresc_4 = _RTCC_CTRL_CNTPRESC_DIV4, rtccCntPresc_8 = _RTCC_CTRL_CNTPRESC_DIV8, rtccCntPresc_16 = _RTCC_CTRL_CNTPRESC_DIV16, rtccCntPresc_32 = _RTCC_CTRL_CNTPRESC_DIV32, rtccCntPresc_64 = _RTCC_CTRL_CNTPRESC_DIV64, rtccCntPresc_128 = _RTCC_CTRL_CNTPRESC_DIV128, rtccCntPresc_256 = _RTCC_CTRL_CNTPRESC_DIV256, rtccCntPresc_512 = _RTCC_CTRL_CNTPRESC_DIV512, rtccCntPresc_1024 = _RTCC_CTRL_CNTPRESC_DIV1024, rtccCntPresc_2048 = _RTCC_CTRL_CNTPRESC_DIV2048, rtccCntPresc_4096 = _RTCC_CTRL_CNTPRESC_DIV4096, rtccCntPresc_8192 = _RTCC_CTRL_CNTPRESC_DIV8192, rtccCntPresc_16384 = _RTCC_CTRL_CNTPRESC_DIV16384, rtccCntPresc_32768 = _RTCC_CTRL_CNTPRESC_DIV32768 } |
enum | RTCC_CompBase_TypeDef { rtccCompBaseCnt = _RTCC_CC_CTRL_COMPBASE_CNT, rtccCompBasePreCnt = _RTCC_CC_CTRL_COMPBASE_PRECNT } |
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 } |
enum | RTCC_DayCompareMode_TypeDef { rtccDayCompareModeMonth = _RTCC_CC_CTRL_DAYCC_MONTH, rtccDayCompareModeWeek = _RTCC_CC_CTRL_DAYCC_WEEK } |
enum | RTCC_InEdgeSel_TypeDef { rtccInEdgeRising = _RTCC_CC_CTRL_ICEDGE_RISING, rtccInEdgeFalling = _RTCC_CC_CTRL_ICEDGE_FALLING, rtccInEdgeBoth = _RTCC_CC_CTRL_ICEDGE_BOTH, rtccInEdgeNone = _RTCC_CC_CTRL_ICEDGE_NONE } |
enum | RTCC_PrescMode_TypeDef { rtccCntTickPresc = _RTCC_CTRL_CNTTICK_PRESC, rtccCntTickCCV0Match = _RTCC_CTRL_CNTTICK_CCV0MATCH } |
enum | RTCC_PRSSel_TypeDef { rtccPRSCh0 = _RTCC_CC_CTRL_PRSSEL_PRSCH0, rtccPRSCh1 = _RTCC_CC_CTRL_PRSSEL_PRSCH1, rtccPRSCh2 = _RTCC_CC_CTRL_PRSSEL_PRSCH2, rtccPRSCh3 = _RTCC_CC_CTRL_PRSSEL_PRSCH3, rtccPRSCh4 = _RTCC_CC_CTRL_PRSSEL_PRSCH4, rtccPRSCh5 = _RTCC_CC_CTRL_PRSSEL_PRSCH5, rtccPRSCh6 = _RTCC_CC_CTRL_PRSSEL_PRSCH6, rtccPRSCh7 = _RTCC_CC_CTRL_PRSSEL_PRSCH7, rtccPRSCh8 = _RTCC_CC_CTRL_PRSSEL_PRSCH8, rtccPRSCh9 = _RTCC_CC_CTRL_PRSSEL_PRSCH9, rtccPRSCh10 = _RTCC_CC_CTRL_PRSSEL_PRSCH10, rtccPRSCh11 = _RTCC_CC_CTRL_PRSSEL_PRSCH11 } |
Functions | |
__STATIC_INLINE uint32_t | RTCC_ChannelCCVGet (int ch) |
Get RTCC capture/compare register value (CCV) for selected channel. More... | |
__STATIC_INLINE void | RTCC_ChannelCCVSet (int ch, uint32_t value) |
Set RTCC capture/compare register value (CCV) for selected channel. More... | |
__STATIC_INLINE uint32_t | RTCC_ChannelDateGet (int ch) |
Get the calendar DATE register content for selected channel. More... | |
__STATIC_INLINE void | RTCC_ChannelDateSet (int ch, uint32_t date) |
Set the calendar DATE register for selected channel. More... | |
void | RTCC_ChannelInit (int ch, RTCC_CCChConf_TypeDef const *confPtr) |
Configure the selected capture/compare channel of the RTCC. More... | |
__STATIC_INLINE uint32_t | RTCC_ChannelTimeGet (int ch) |
Get the calendar TIME register content for selected channel. More... | |
__STATIC_INLINE void | RTCC_ChannelTimeSet (int ch, uint32_t time) |
Set the calendar TIME register for selected channel. More... | |
__STATIC_INLINE uint32_t | RTCC_CombinedCounterGet (void) |
Get the combined CNT/PRECNT register content. More... | |
__STATIC_INLINE uint32_t | RTCC_CounterGet (void) |
Get RTCC counter value. More... | |
__STATIC_INLINE void | RTCC_CounterSet (uint32_t value) |
Set RTCC CNT counter. More... | |
__STATIC_INLINE uint32_t | RTCC_DateGet (void) |
Get DATE register value. More... | |
__STATIC_INLINE void | RTCC_DateSet (uint32_t date) |
Set RTCC DATE register. More... | |
__STATIC_INLINE void | RTCC_EM4WakeupEnable (bool enable) |
Enable/disable EM4 wakeup capability. More... | |
void | RTCC_Enable (bool enable) |
Enable/disable RTCC. More... | |
void | RTCC_Init (const RTCC_Init_TypeDef *init) |
Initialize RTCC. More... | |
__STATIC_INLINE void | RTCC_IntClear (uint32_t flags) |
Clear one or more pending RTCC interrupts. More... | |
__STATIC_INLINE void | RTCC_IntDisable (uint32_t flags) |
Disable one or more RTCC interrupts. More... | |
__STATIC_INLINE void | RTCC_IntEnable (uint32_t flags) |
Enable one or more RTCC interrupts. More... | |
__STATIC_INLINE uint32_t | RTCC_IntGet (void) |
Get pending RTCC interrupt flags. More... | |
__STATIC_INLINE uint32_t | RTCC_IntGetEnabled (void) |
Get enabled and pending RTCC interrupt flags. More... | |
__STATIC_INLINE void | RTCC_IntSet (uint32_t flags) |
Set one or more pending RTCC interrupts from SW. More... | |
__STATIC_INLINE void | RTCC_Lock (void) |
Lock RTCC registers. More... | |
__STATIC_INLINE uint32_t | RTCC_PreCounterGet (void) |
Get RTCC pre-counter value. More... | |
__STATIC_INLINE void | RTCC_PreCounterSet (uint32_t preCntVal) |
Set RTCC pre-counter value. More... | |
void | RTCC_Reset (void) |
Restore RTCC to its reset state. | |
__STATIC_INLINE void | RTCC_RetentionRamPowerDown (void) |
Power down the retention ram. More... | |
void | RTCC_StatusClear (void) |
Clear STATUS register. | |
__STATIC_INLINE uint32_t | RTCC_StatusGet (void) |
Get STATUS register value. More... | |
__STATIC_INLINE uint32_t | RTCC_TimeGet (void) |
Get TIME register value. More... | |
__STATIC_INLINE void | RTCC_TimeSet (uint32_t time) |
Set RTCC TIME register. More... | |
__STATIC_INLINE void | RTCC_Unlock (void) |
Unlock RTCC registers. More... | |