27#ifndef LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX32680_RTC_H_
28#define LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX32680_RTC_H_
32#include "mxc_device.h"
46#define MXC_RTC_MAX_SSEC (MXC_F_RTC_SSEC_SSEC + 1)
47#define MXC_RTC_TRIM_TMR_IRQ \
171__attribute__((deprecated(
"Use MXC_RTC_GetSubSeconds() instead.")))
188__attribute__((deprecated(
"Use MXC_RTC_GetSeconds() instead.")))
#define MXC_F_RTC_CTRL_SSEC_ALARM_IE
Definition: rtc_regs.h:161
#define MXC_F_RTC_CTRL_TOD_ALARM
Definition: rtc_regs.h:173
#define MXC_F_RTC_CTRL_RDY_IE
Definition: rtc_regs.h:170
#define MXC_S_RTC_CTRL_SQW_SEL_FREQ1HZ
Definition: rtc_regs.h:184
#define MXC_F_RTC_CTRL_RDY
Definition: rtc_regs.h:167
#define MXC_F_RTC_CTRL_SSEC_ALARM
Definition: rtc_regs.h:176
#define MXC_S_RTC_CTRL_SQW_SEL_FREQ512HZ
Definition: rtc_regs.h:186
#define MXC_F_RTC_CTRL_TOD_ALARM_IE
Definition: rtc_regs.h:158
#define MXC_S_RTC_CTRL_SQW_SEL_FREQ4KHZ
Definition: rtc_regs.h:188
int MXC_RTC_Stop(void)
Stop the Real Time Clock (Blocking function)
int MXC_RTC_EnableInt(uint32_t mask)
Enable Interurpts (Blocking function)
int MXC_RTC_GetSubSeconds(uint32_t *ssec)
This function stores the current value of the sub-seconds counter into a pointer if the RTC is not bu...
int MXC_RTC_GetBusyFlag(void)
Get RTC busy flag.
int MXC_RTC_DisableInt(uint32_t mask)
Disable Interurpts (Blocking function)
int MXC_RTC_GetSecond(void)
Get Second or E_BUSY, see /ref MXC_ERROR_CODES.
mxc_rtc_int_en_t
Bitmasks for each of the RTC's interrupt enables.
Definition: rtc.h:64
mxc_rtc_freq_sel_t
Definition: rtc.h:54
int MXC_RTC_Trim(int8_t trm)
Set Trim register value (Blocking function)
int MXC_RTC_SquareWaveStart(mxc_rtc_freq_sel_t fq)
Allow generation of Square Wave on the SQW pin (Blocking function)
int MXC_RTC_TrimCrystal(void)
Use the 32 MHz crystal to trim the 32 kHz crystal.
int MXC_RTC_GetSubSecond(void)
Get SubSecond or E_BUSY, see /ref MXC_ERROR_CODES.
int MXC_RTC_ClearFlags(int flags)
Clear interrupt flags.
int MXC_RTC_GetFlags(void)
Gets interrupt flags.
int MXC_RTC_SquareWaveStop(void)
Stop the generation of square wave (Blocking function)
int MXC_RTC_GetTime(uint32_t *sec, uint32_t *subsec)
Get the current second and sub-second counts.
mxc_rtc_int_fl_t
Bitmasks for each of the RTC's interrupt flags.
Definition: rtc.h:74
int MXC_RTC_Start(void)
Start the Real Time Clock (Blocking function)
int MXC_RTC_SetSubsecondAlarm(uint32_t rssa)
Set Sub-Second alarm value and enable interrupt,.
int MXC_RTC_GetSeconds(uint32_t *sec)
This function stores the current value of the seconds counter into a pointer if the RTC is not busy....
int MXC_RTC_SetTimeofdayAlarm(uint32_t ras)
Set Time-of-Day alarm value and enable Interrupt.
int MXC_RTC_Init(uint32_t sec, uint16_t ssec)
Initialize the sec and ssec registers and enable RTC (Blocking function)
@ MXC_RTC_INT_EN_SHORT
Definition: rtc.h:66
@ MXC_RTC_INT_EN_LONG
Definition: rtc.h:65
@ MXC_RTC_INT_EN_READY
Definition: rtc.h:68
@ MXC_RTC_F_1HZ
Definition: rtc.h:55
@ MXC_RTC_F_32KHZ
Definition: rtc.h:58
@ MXC_RTC_F_4KHZ
Definition: rtc.h:57
@ MXC_RTC_F_512HZ
Definition: rtc.h:56
@ MXC_RTC_INT_FL_SHORT
Definition: rtc.h:76
@ MXC_RTC_INT_FL_LONG
Definition: rtc.h:75
@ MXC_RTC_INT_FL_READY
Definition: rtc.h:77
Registers, Bit Masks and Bit Positions for the RTC Peripheral Module.