#include <stdbool.h>#include <stdint.h>#include "../inc/hw_types.h"#include "../inc/hw_memmap.h"#include "../inc/hw_aon_rtc.h"#include "debug.h"Macros | |
| #define | AON_RTC_CH_NONE 0x0 |
| #define | AON_RTC_CH0 0x1 |
| #define | AON_RTC_CH1 0x2 |
| #define | AON_RTC_CH2 0x4 |
| #define | AON_RTC_ACTIVE 0x8 |
| #define | AON_RTC_CONFIG_DELAY_NODELAY 0 |
| #define | AON_RTC_CONFIG_DELAY_1 1 |
| #define | AON_RTC_CONFIG_DELAY_2 2 |
| #define | AON_RTC_CONFIG_DELAY_4 3 |
| #define | AON_RTC_CONFIG_DELAY_8 4 |
| #define | AON_RTC_CONFIG_DELAY_16 5 |
| #define | AON_RTC_CONFIG_DELAY_32 6 |
| #define | AON_RTC_CONFIG_DELAY_48 7 |
| #define | AON_RTC_CONFIG_DELAY_64 8 |
| #define | AON_RTC_CONFIG_DELAY_80 9 |
| #define | AON_RTC_CONFIG_DELAY_96 10 |
| #define | AON_RTC_CONFIG_DELAY_112 11 |
| #define | AON_RTC_CONFIG_DELAY_128 12 |
| #define | AON_RTC_CONFIG_DELAY_144 13 |
| #define | AON_RTC_MODE_CH1_CAPTURE 1 |
| #define | AON_RTC_MODE_CH1_COMPARE 0 |
| #define | AON_RTC_MODE_CH2_CONTINUOUS 1 |
| #define | AON_RTC_MODE_CH2_NORMALCOMPARE 0 |
| #define | FACTOR_SEC_TO_COMP_VAL_FORMAT 0x00010000 |
Functions | |
| static void | AONRTCEnable (void) |
| Enable the RTC. More... | |
| static void | AONRTCDisable (void) |
| Disable the RTC. More... | |
| static void | AONRTCReset (void) |
| Reset the RTC. More... | |
| static bool | AONRTCActive (void) |
| Check if the RTC is active (enabled). More... | |
| static bool | AONRTCChannelActive (uint32_t ui32Channel) |
| Check if an RTC channel is active (enabled). More... | |
| static void | AONRTCDelayConfig (uint32_t ui32Delay) |
| Configure Event Delay for the RTC. More... | |
| static void | AONRTCCombinedEventConfig (uint32_t ui32Channels) |
| Configure the source of the combined event. More... | |
| static void | AONRTCEventClear (uint32_t ui32Channel) |
| Clear event from a specified channel. More... | |
| static bool | AONRTCEventGet (uint32_t ui32Channel) |
| Get event status for a specified channel. More... | |
| static uint32_t | AONRTCSecGet (void) |
| Get integer part (seconds) of RTC free-running timer. More... | |
| static uint32_t | AONRTCFractionGet (void) |
| Get fractional part (sub-seconds) of RTC free-running timer. More... | |
| static uint32_t | AONRTCSubSecIncrGet (void) |
| Get the sub second increment of the RTC. More... | |
| static void | AONRTCModeCh1Set (uint32_t ui32Mode) |
| Set operational mode of channel 1. More... | |
| static uint32_t | AONRTCModeCh1Get (void) |
| Get operational mode of channel 1. More... | |
| static void | AONRTCModeCh2Set (uint32_t ui32Mode) |
| Set operational mode of channel 2. More... | |
| static uint32_t | AONRTCModeCh2Get (void) |
| Get operational mode of channel 2. More... | |
| static void | AONRTCChannelEnable (uint32_t ui32Channel) |
| Enable event operation for the specified channel. More... | |
| static void | AONRTCChannelDisable (uint32_t ui32Channel) |
| Disable event operation for the specified channel. More... | |
| static void | AONRTCCompareValueSet (uint32_t ui32Channel, uint32_t ui32CompValue) |
| Set the compare value for the given channel. More... | |
| static uint32_t | AONRTCCompareValueGet (uint32_t ui32Channel) |
| Get the compare value for the given channel. More... | |
| static uint32_t | AONRTCCurrentCompareValueGet (void) |
| Get the current value of the RTC counter in a format that matches RTC compare values. More... | |
| uint64_t | AONRTCCurrent64BitValueGet (void) |
| Get the current 64-bit value of the RTC counter. More... | |
| static void | AONRTCIncValueCh2Set (uint32_t ui32IncValue) |
| Set the channel 2 increment value when operating in continuous mode. More... | |
| static uint32_t | AONRTCIncValueCh2Get (void) |
| Get the channel2 increment value when operating in continuous mode. More... | |
| static uint32_t | AONRTCCaptureValueCh1Get (void) |
| Get the channel 1 capture value. More... | |