2.93 Real-time Clock (RTC)
This Plib implements software abstraction for RTC Peripheral.
Library Interface
Real-time Clock peripheral library provides the following interfaces:
Functions
Name | Description |
---|---|
RTC_Initialize | Initializes given instance of the RTC peripheral |
RTC_TimeSet | Sets the Time for the RTC peripheral |
RTC_TimeGet | Reads the current time |
RTC_AlarmSet | Sets up the Alarm |
RTC_FirstTimeStampGet | Reads the timestamp for first occurrence of given tamper input |
RTC_LastTimeStampGet | Reads the timestamp for last occurrence of given tamper input |
RTC_InterruptDisable | Disables the specified RTC interrupt |
RTC_InterruptEnable | Enables the specified RTC interrupt |
RTC_FrequencyCorrect | Calibrate for too-slow or too-fast oscillator |
RTC_Timer16CounterHasOverflowed | Checks if the 16-bit counter has overflowed |
RTC_Timer16Compare0HasMatched | Returns true if the 16-bit Timer Compare 0 value has matched the counter |
RTC_Timer16Compare1HasMatched | Returns true if the 16-bit Timer Compare 1 value has matched the counter |
RTC_Timer16Compare2HasMatched | Returns true if the 16-bit Timer Compare 2 value has matched the counter |
RTC_Timer16Compare3HasMatched | Returns true if the 16-bit Timer Compare 3 value has matched the counter |
RTC_Timer16Start | Starts the 16-bit timer |
RTC_Timer16Stop | Stops the 16-bit timer from counting |
RTC_Timer16CounterSet | Set the 16-bit Timer Counter Value |
RTC_Timer16PeriodSet | Set the 16-bit timer period value |
RTC_Timer16PeriodGet | Get 16-bit timer period Value |
RTC_Timer16CounterGet | Get the current 16-bit counter value |
RTC_Timer16FrequencyGet | Returns the frequency at which the 16-bit timer counter is operating |
RTC_Timer16InterruptEnable | Enable Selected RTC interrupt |
RTC_Timer16InterruptDisable | Disable Selected RTC Interrupt |
RTC_Timer16Compare0Set | Set the 16-Bit Counter Compare 0 Value |
RTC_Timer16Compare1Set | Set the 16-Bit Counter Compare 1 Value |
RTC_Timer16Compare2Set | Set the 16-Bit Counter Compare 2 Value |
RTC_Timer16Compare3Set | Set the 16-Bit Counter Compare 3 Value |
RTC_Timer16TimeStampGet | Get the Time stamp of Tamper Detection |
RTC_Timer16CallbackRegister | Register the callback function to be called when an 16-bit Timer Interrupt occurs |
RTC_Timer32CompareHasMatched | Check for 32-bit Timer Compare match |
RTC_Timer32Compare0HasMatched | Check for 32-bit Timer Compare match |
RTC_Timer32Compare1HasMatched | Check for 32-bit Timer Compare match |
RTC_Timer32CounterHasOverflowed | Check if the 32-bit counter overflow |
RTC_Timer32Start | Starts the 32-bit timer |
RTC_Timer32Stop | Stops the 32-bit timer from counting |
RTC_Timer32CounterSet | Set the 32-bit Timer Counter Value |
RTC_Timer32CompareSet | Set the 32-bit timer period value |
RTC_Timer32Compare0Set | Set the 32-bit timer period value |
RTC_Timer32Compare1Set | Set the 32-bit timer period value |
RTC_Timer32PeriodGet | Get 32-bit timer period Value |
RTC_Timer32CounterGet | Get the current 32-bit counter value |
RTC_Timer32FrequencyGet | Returns the frequency at which the 32-bit timer counter is operating |
RTC_Timer32InterruptEnable | Enable selected RTC interrupt |
RTC_Timer32InterruptDisable | Disable selected RTC interrupt |
RTC_Timer32CallbackRegister | Register the callback function to be called when an 32-bit Timer Interrupt occurs |
RTC_Timer32TimeStampGet | Get the Time stamp of Tamper Detection |
RTC_PeriodicIntervalHasCompleted | Check if the configured periodic interval has expired |
RTC_RTCCTimeGet | Gets the current time and date |
RTC_RTCCTimeSet | Sets the Real Time Clock Calendar time and date |
RTC_RTCCAlarmSet | Set an alarm |
RTC_RTCCCallbackRegister | Register the callback function to be called when an RTCC Interrupt occurs |
RTC_BackupRegisterSet | Set the value for the selected Backup Register |
RTC_BackupRegisterGet | Get the value stored in the selected Backup Register |
RTC_TamperSourceGet | Get the Tamper source |
RTC_RTCCTimeStampGet | Get the Time stamp of Tamper Detection |
RTC_CallbackRegister | Sets the pointer to the function (and it's context) to be called when the Timeout events occur |
Data types and constants
Name | Type | Description |
---|---|---|
RTC_ALARM_MASK | Enum | Defines the data type for the RTC Alarm Mask |
RTC_INT_MASK | Enum | Defines the Interrupt mask for RTC events |
RTC_TAMP_INPUT | Enum | Defines the Tamper input |
RTC_TIMER16_INT_MASK | Enum | Possible RTC 16-bit Timer Counter Mode Events |
RTC_TIMER16_CALLBACK | Typedef | Defines the data type and function signature of the RTC 16-bit Timer Counter callback function |
RTC_TIMER32_INT_MASK | Enum | Possible RTC 32-bit Timer Counter Mode Events |
RTC_TIMER32_CALLBACK | Typedef | Defines the data type and function signature of the RTC 32-bit Timer Counter callback function |
RTC_PERIODIC_INT_MASK | Enum | Possible Periodic Interrupt Mask |
RTC_CLOCK_EVENT | Enum | Possible RTC RTCC Mode Events |
BACKUP_REGISTER | Enum | Possible Backup Register Mask |
TAMPER_CHANNEL | Enum | Possible Tamper Channel Mask |
RTC_CLOCK_INT_MASK | Enum | Possible RTC Clock Mode Events |
RTC_CALLBACK | Typedef | Defines the data type and function signature for the RTC peripheral callback function |
Note: Not all APIs maybe implemented. See the specific device
family section for available APIs.