MSPM0GX51X Driver Library  2.05.01.00
dl_rtc_common.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY TfHEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 /*!****************************************************************************
33  * @file dl_rtc_common.h
34  * @brief Real Time Clock A (RTC Common) Peripheral Interface
35  * @defgroup Common Real Time Clock (RTC_Common)
36  *
37  * @anchor ti_devices_msp_dl_rtc_common_Overview
38  * # Overview
39  * The RTC Common Driver Library allows full configuration of the MSPM0 RTC Common module.
40  * The real-time clock (RTC Common) module provides clock counters with calendar mode,
41  * a flexible programmable alarm, offset calibration, and a provision for
42  * temperature compensation. The module also provides a separate time stamp calendar
43  * capable of capturing a time stamp event upon loss of VDD or detection of a tamper event
44  * on a tamper I/O pin.
45  *
46  * <hr>
47  ******************************************************************************
48  */
52 #ifndef ti_dl_dl_rtc_common__include
53 #define ti_dl_dl_rtc_common__include
54 
55 #include <stdbool.h>
56 #include <stdint.h>
57 
58 #include <ti/devices/msp/msp.h>
59 #include <ti/driverlib/dl_common.h>
60 
61 #if defined __MSPM0_HAS_RTC_A__ || defined __MSPM0_HAS_RTC_B__ || \
62  defined __MSPM0_HAS_RTC__ || defined(DOXYGEN__INCLUDE)
63 
64 #ifdef __cplusplus
65 extern "C" {
66 #endif
67 
68 /* clang-format off */
69 
77 #define DL_RTC_COMMON_INTERRUPT_CALENDAR_ALARM1 (RTC_CPU_INT_IMASK_RTCA1_SET)
78 
82 #define DL_RTC_COMMON_INTERRUPT_CALENDAR_ALARM2 (RTC_CPU_INT_IMASK_RTCA2_SET)
83 
87 #define DL_RTC_COMMON_INTERRUPT_PRESCALER0 (RTC_CPU_INT_IMASK_RT0PS_SET)
88 
92 #define DL_RTC_COMMON_INTERRUPT_PRESCALER1 (RTC_CPU_INT_IMASK_RT1PS_SET)
93 
94 #ifdef __MSPM0_HAS_RTC_B__
95 
98 #define DL_RTC_COMMON_INTERRUPT_PRESCALER2 (RTC_CPU_INT_IMASK_RT2PS_SET)
99 #endif
100 
104 #define DL_RTC_COMMON_INTERRUPT_INTERVAL_ALARM (RTC_CPU_INT_IMASK_RTCTEV_SET)
105 
109 #define DL_RTC_COMMON_INTERRUPT_READY (RTC_CPU_INT_IMASK_RTCRDY_SET)
110 
111 #ifdef __MSPM0_HAS_RTC_A__
112 
115 #define DL_RTC_COMMON_INTERRUPT_TSEVT (RTC_CPU_INT_IMASK_TSEVT_SET)
116 #endif
117 
127 #define DL_RTC_COMMON_EVENT_CALENDAR_ALARM1 (RTC_GEN_EVENT_IMASK_RTCA1_SET)
128 
132 #define DL_RTC_COMMON_EVENT_CALENDAR_ALARM2 (RTC_GEN_EVENT_IMASK_RTCA2_SET)
133 
137 #define DL_RTC_COMMON_EVENT_PRESCALER0 (RTC_GEN_EVENT_IMASK_RT0PS_SET)
138 
142 #define DL_RTC_COMMON_EVENT_PRESCALER1 (RTC_GEN_EVENT_IMASK_RT1PS_SET)
143 
144 #ifdef __MSPM0_HAS_RTC_B__
145 
148 #define DL_RTC_COMMON_EVENT_PRESCALER2 (RTC_GEN_EVENT_IMASK_RT2PS_SET)
149 #endif
150 
154 #define DL_RTC_COMMON_EVENT_INTERVAL_ALARM (RTC_GEN_EVENT_IMASK_RTCTEV_SET)
155 
159 #define DL_RTC_COMMON_EVENT_READY (RTC_GEN_EVENT_IMASK_RTCRDY_SET)
160 
161 #ifdef __MSPM0_HAS_RTC_A__
162 
165 #define DL_RTC_COMMON_EVENT_TSEVT (RTC_GEN_EVENT_IMASK_TSEVT_SET)
166 #endif
167 
170 #ifdef __MSPM0_HAS_RTC_A__
171 
178 #define DL_RTC_COMMON_TIME_STAMP_EVENT_CAUSE_TIO_0 (RTC_TSSTAT_TSTIOEVT0_SET)
179 
183 #define DL_RTC_COMMON_TIME_STAMP_EVENT_CAUSE_TIO_1 (RTC_TSSTAT_TSTIOEVT1_SET)
184 
188 #define DL_RTC_COMMON_TIME_STAMP_EVENT_CAUSE_TIO_2 (RTC_TSSTAT_TSTIOEVT2_SET)
189 
193 #define DL_RTC_COMMON_TIME_STAMP_EVENT_CAUSE_TIO_3 (RTC_TSSTAT_TSTIOEVT3_SET)
194 
198 #define DL_RTC_COMMON_TIME_STAMP_EVENT_CAUSE_TIO_4 (RTC_TSSTAT_TSTIOEV4_SET)
199 
203 #define DL_RTC_COMMON_TIME_STAMP_EVENT_CAUSE_TIO_5 (RTC_TSSTAT_TSTIOEVT5_SET)
204 
208 #define DL_RTC_COMMON_TIME_STAMP_EVENT_CAUSE_TIO_6 (RTC_TSSTAT_TSTIOEVT6_SET)
209 
213 #define DL_RTC_COMMON_TIME_STAMP_EVENT_CAUSE_TIO_7 (RTC_TSSTAT_TSTIOEVT7_SET)
214 
218 #define DL_RTC_COMMON_TIME_STAMP_EVENT_CAUSE_TIO_8 (RTC_TSSTAT_TSTIOEV8_SET)
219 
223 #define DL_RTC_COMMON_TIME_STAMP_EVENT_CAUSE_TIO_9 (RTC_TSSTAT_TSTIOEVT9_SET)
224 
228 #define DL_RTC_COMMON_TIME_STAMP_EVENT_CAUSE_TIO_10 (RTC_TSSTAT_TSTIOEVT10_SET)
229 
233 #define DL_RTC_COMMON_TIME_STAMP_EVENT_CAUSE_TIO_11 (RTC_TSSTAT_TSTIOEVT11_SET)
234 
238 #define DL_RTC_COMMON_TIME_STAMP_EVENT_CAUSE_TIO_12 (RTC_TSSTAT_TSTIOEVT12_SET)
239 
243 #define DL_RTC_COMMON_TIME_STAMP_EVENT_CAUSE_TIO_13 (RTC_TSSTAT_TSTIOEVT13_SET)
244 
248 #define DL_RTC_COMMON_TIME_STAMP_EVENT_CAUSE_TIO_14 (RTC_TSSTAT_TSTIOEVT14_SET)
249 
253 #define DL_RTC_COMMON_TIME_STAMP_EVENT_CAUSE_TIO_15 (RTC_TSSTAT_TSTIOEVT15_SET)
254 
258 #define DL_RTC_COMMON_TIME_STAMP_EVENT_CAUSE_VDD_LOSS (RTC_TSSTAT_TSVDDEVT_SET)
259 
269 #define DL_RTC_COMMON_TIME_STAMP_EVENT_SOURCE_TIO_0 (RTC_TSCTL_TSTIOEN0_ENABLE)
270 
274 #define DL_RTC_COMMON_TIME_STAMP_EVENT_SOURCE_TIO_1 (RTC_TSCTL_TSTIOEN1_ENABLE)
275 
279 #define DL_RTC_COMMON_TIME_STAMP_EVENT_SOURCE_TIO_2 (RTC_TSCTL_TSTIOEN2_ENABLE)
280 
284 #define DL_RTC_COMMON_TIME_STAMP_EVENT_SOURCE_TIO_3 (RTC_TSCTL_TSTIOEN3_ENABLE)
285 
289 #define DL_RTC_COMMON_TIME_STAMP_EVENT_SOURCE_TIO_4 (RTC_TSCTL_TSTIOEN4_ENABLE)
290 
294 #define DL_RTC_COMMON_TIME_STAMP_EVENT_SOURCE_TIO_5 (RTC_TSCTL_TSTIOEN5_ENABLE)
295 
299 #define DL_RTC_COMMON_TIME_STAMP_EVENT_SOURCE_TIO_6 (RTC_TSCTL_TSTIOEN6_ENABLE)
300 
304 #define DL_RTC_COMMON_TIME_STAMP_EVENT_SOURCE_TIO_7 (RTC_TSCTL_TSTIOEN8_ENABLE)
305 
309 #define DL_RTC_COMMON_TIME_STAMP_EVENT_SOURCE_TIO_8 (RTC_TSCTL_TSTIOEN8_ENABLE)
310 
314 #define DL_RTC_COMMON_TIME_STAMP_EVENT_SOURCE_TIO_9 (RTC_TSCTL_TSTIOEN9_ENABLE)
315 
319 #define DL_RTC_COMMON_TIME_STAMP_EVENT_SOURCE_TIO_10 (RTC_TSCTL_TSTIOEN10_ENABLE)
320 
324 #define DL_RTC_COMMON_TIME_STAMP_EVENT_SOURCE_TIO_11 (RTC_TSCTL_TSTIOEN11_ENABLE)
325 
329 #define DL_RTC_COMMON_TIME_STAMP_EVENT_SOURCE_TIO_12 (RTC_TSCTL_TSTIOEN12_ENABLE)
330 
334 #define DL_RTC_COMMON_TIME_STAMP_EVENT_SOURCE_TIO_13 (RTC_TSCTL_TSTIOEN13_ENABLE)
335 
339 #define DL_RTC_COMMON_TIME_STAMP_EVENT_SOURCE_TIO_14 (RTC_TSCTL_TSTIOEN14_ENABLE)
340 
344 #define DL_RTC_COMMON_TIME_STAMP_EVENT_SOURCE_TIO_15 (RTC_TSCTL_TSTIOEN15_ENABLE)
345 
349 #define DL_RTC_COMMON_TIME_STAMP_EVENT_SOURCE_VDD_LOSS (RTC_TSCTL_TSVDDEN_ENABLE)
350 
352 #endif
353 
355 typedef enum {
357  DL_RTC_COMMON_STATUS_READY = RTC_STA_RTCRDY_READY,
359  DL_RTC_COMMON_STATUS_NOT_READY = RTC_STA_RTCRDY_NOT_READY
361 
363 typedef enum {
365  DL_RTC_COMMON_COMPENSATION_STATUS_READY = RTC_STA_RTCTCRDY_READY,
367  DL_RTC_COMMON_COMPENSATION_STATUS_NOT_READY = RTC_STA_RTCTCRDY_NOT_READY
369 
371 typedef enum {
377 
379 typedef enum {
385 
387 typedef enum {
388  #ifdef __MSPM0_HAS_RTC__
389 
390  DL_RTC_COMMON_OFFSET_CALIBRATION_FREQUENCY_OFF = RTC_CAL_RTCCALFX_OFF,
391  #endif
392  #ifdef __MSPM0_HAS_RTC_A__
393 
394  DL_RTC_COMMON_OFFSET_CALIBRATION_FREQUENCY_32_KHZ = LFSS_CAL_RTCCALFX_F32KHZ,
395  #endif
396 
403 
405 typedef enum {
407  DL_RTC_COMMON_TEMP_CALIBRATION_DOWN1PPM = RTC_TCMP_RTCTCMPS_DOWN,
411 
413 typedef enum {
415  DL_RTC_COMMON_FORMAT_BINARY = RTC_CTL_RTCBCD_BINARY,
417  DL_RTC_COMMON_FORMAT_BCD = RTC_CTL_RTCBCD_BCD
419 
421 typedef enum {
423  DL_RTC_COMMON_INTERVAL_ALARM_MINUTECHANGE = RTC_CTL_RTCTEVTX_MINUTE,
427  DL_RTC_COMMON_INTERVAL_ALARM_NOON = RTC_CTL_RTCTEVTX_NOON,
429  DL_RTC_COMMON_INTERVAL_ALARM_MIDNIGHT = RTC_CTL_RTCTEVTX_MIDNIGHT
431 
433 typedef enum {
435  DL_RTC_COMMON_PRESCALER0_DIVIDE_8 = RTC_PSCTL_RT0IP_DIV8,
437  DL_RTC_COMMON_PRESCALER0_DIVIDE_16 = RTC_PSCTL_RT0IP_DIV16,
439  DL_RTC_COMMON_PRESCALER0_DIVIDE_32 = RTC_PSCTL_RT0IP_DIV32,
441  DL_RTC_COMMON_PRESCALER0_DIVIDE_64 = RTC_PSCTL_RT0IP_DIV64,
443  DL_RTC_COMMON_PRESCALER0_DIVIDE_128 = RTC_PSCTL_RT0IP_DIV128,
445  DL_RTC_COMMON_PRESCALER0_DIVIDE_256 = RTC_PSCTL_RT0IP_DIV256
447 
449 typedef enum {
451  DL_RTC_COMMON_PRESCALER1_DIVIDE_2 = RTC_PSCTL_RT1IP_DIV2,
453  DL_RTC_COMMON_PRESCALER1_DIVIDE_4 = RTC_PSCTL_RT1IP_DIV4,
455  DL_RTC_COMMON_PRESCALER1_DIVIDE_8 = RTC_PSCTL_RT1IP_DIV8,
457  DL_RTC_COMMON_PRESCALER1_DIVIDE_16 = RTC_PSCTL_RT1IP_DIV16,
459  DL_RTC_COMMON_PRESCALER1_DIVIDE_32 = RTC_PSCTL_RT1IP_DIV32,
461  DL_RTC_COMMON_PRESCALER1_DIVIDE_64 = RTC_PSCTL_RT1IP_DIV64,
463  DL_RTC_COMMON_PRESCALER1_DIVIDE_128 = RTC_PSCTL_RT1IP_DIV128,
465  DL_RTC_COMMON_PRESCALER1_DIVIDE_256 = RTC_PSCTL_RT1IP_DIV256
467 
469 typedef enum {
471  DL_RTC_COMMON_PRESCALER2_4_SEC = RTC_EXTPSCTL_RT2PS_INT4S,
473  DL_RTC_COMMON_PRESCALER2_8_SEC = RTC_EXTPSCTL_RT2PS_INT8S,
475  DL_RTC_COMMON_PRESCALER2_16_SEC = RTC_EXTPSCTL_RT2PS_INT16S
477 
479 typedef enum {
481  DL_RTC_COMMON_IIDX_ALARM1 = RTC_CPU_INT_IIDX_STAT_RTCA1,
483  DL_RTC_COMMON_IIDX_ALARM2 = RTC_CPU_INT_IIDX_STAT_RTCA2,
485  DL_RTC_COMMON_IIDX_PRESCALER0 = RTC_CPU_INT_IIDX_STAT_RT0PS,
487  DL_RTC_COMMON_IIDX_PRESCALER1 = RTC_CPU_INT_IIDX_STAT_RT1PS,
489  DL_RTC_COMMON_IIDX_PRESCALER2 = RTC_CPU_INT_IIDX_STAT_RT2PS,
491  DL_RTC_COMMON_IIDX_INTERVAL_TIMER = RTC_CPU_INT_IIDX_STAT_RTCTEV,
493  DL_RTC_COMMON_IIDX_READY = RTC_CPU_INT_IIDX_STAT_RTCRDY,
495  #ifdef __MSPM0_HAS_RTC_A__
496  DL_RTC_COMMON_IIDX_TSEVT = RTC_CPU_INT_IIDX_STAT_TSEVT,
498  DL_RTC_COMMON_IIDX_TAMPER_IO_0 = RTC_CPU_INT_IIDX_STAT_TIO0,
500  DL_RTC_COMMON_IIDX_TAMPER_IO_1 = RTC_CPU_INT_IIDX_STAT_TIO1,
502  DL_RTC_COMMON_IIDX_TAMPER_IO_2 = RTC_CPU_INT_IIDX_STAT_TIO2,
504  DL_RTC_COMMON_IIDX_TAMPER_IO_3 = RTC_CPU_INT_IIDX_STAT_TIO3,
506  DL_RTC_COMMON_IIDX_TAMPER_IO_4 = RTC_CPU_INT_IIDX_STAT_TIO4,
508  DL_RTC_COMMON_IIDX_TAMPER_IO_5 = RTC_CPU_INT_IIDX_STAT_TIO5,
510  DL_RTC_COMMON_IIDX_TAMPER_IO_6 = RTC_CPU_INT_IIDX_STAT_TIO6,
512  DL_RTC_COMMON_IIDX_TAMPER_IO_7 = RTC_CPU_INT_IIDX_STAT_TIO7,
514  DL_RTC_COMMON_IIDX_TAMPER_IO_8 = RTC_CPU_INT_IIDX_STAT_TIO8,
516  DL_RTC_COMMON_IIDX_TAMPER_IO_9 = RTC_CPU_INT_IIDX_STAT_TIO9,
518  DL_RTC_COMMON_IIDX_TAMPER_IO_10 = RTC_CPU_INT_IIDX_STAT_TIO10,
520  DL_RTC_COMMON_IIDX_TAMPER_IO_11 = RTC_CPU_INT_IIDX_STAT_TIO11,
522  DL_RTC_COMMON_IIDX_TAMPER_IO_12 = RTC_CPU_INT_IIDX_STAT_TIO12,
524  DL_RTC_COMMON_IIDX_TAMPER_IO_13 = RTC_CPU_INT_IIDX_STAT_TIO13,
526  DL_RTC_COMMON_IIDX_TAMPER_IO_14 = RTC_CPU_INT_IIDX_STAT_TIO14,
528  DL_RTC_COMMON_IIDX_TAMPER_IO_15 = RTC_CPU_INT_IIDX_STAT_TIO15,
529  #endif
531 
532 #ifdef __MSPM0_HAS_RTC_A__
533 
534 typedef enum {
536  DL_RTC_COMMON_TIME_STAMP_EVENT_CAPTURE_FIRST = RTC_TSCTL_TSCAPTURE_FIRST,
538  DL_RTC_COMMON_TIME_STAMP_EVENT_CAPTURE_LAST = RTC_TSCTL_TSCAPTURE_LAST,
539 } DL_RTC_COMMON_TIME_STAMP_EVENT_CAPTURE;
540 #endif
541 
542 /* clang-format on */
543 
550 typedef struct {
553  uint8_t minutes;
556  uint8_t hours;
559  uint8_t dayOfWeek;
562  uint8_t dayOfMonth;
564 
571 typedef struct {
574  uint8_t seconds;
577  uint8_t minutes;
580  uint8_t hours;
583  uint8_t dayOfWeek;
586  uint8_t dayOfMonth;
589  uint8_t month;
592  uint16_t year;
594 
605 __STATIC_INLINE bool DL_RTC_Common_isClockSourceLFCLK(
606  const RTC_Regs *rtc_common)
607 {
608  return ((rtc_common->CLKSEL & RTC_CLKSEL_LFCLK_SEL_MASK) ==
609  RTC_CLKSEL_LFCLK_SEL_MASK);
610 }
611 
619 __STATIC_INLINE void DL_RTC_Common_enableClockControl(RTC_Regs *rtc_common)
620 {
621  rtc_common->CLKCTL = RTC_CLKCTL_MODCLKEN_ENABLE;
622 }
623 
629 __STATIC_INLINE void DL_RTC_Common_disableClockControl(RTC_Regs *rtc_common)
630 {
631  rtc_common->CLKCTL = RTC_CLKCTL_MODCLKEN_DISABLE;
632 }
633 
643 __STATIC_INLINE void DL_RTC_Common_enablePower(RTC_Regs *rtc_common)
644 {
645  rtc_common->GPRCM.PWREN =
646  (RTC_PWREN_KEY_UNLOCK_W | RTC_PWREN_ENABLE_ENABLE);
647 }
648 
659 __STATIC_INLINE void DL_RTC_Common_disablePower(RTC_Regs *rtc_common)
660 {
661  rtc_common->GPRCM.PWREN =
662  (RTC_PWREN_KEY_UNLOCK_W | RTC_PWREN_ENABLE_DISABLE);
663 }
664 
681 __STATIC_INLINE bool DL_RTC_Common_isPowerEnabled(const RTC_Regs *rtc_common)
682 {
683  return ((rtc_common->GPRCM.PWREN & RTC_PWREN_ENABLE_MASK) ==
684  RTC_PWREN_ENABLE_ENABLE);
685 }
686 
693 __STATIC_INLINE void DL_RTC_Common_reset(RTC_Regs *rtc_common)
694 {
695  rtc_common->GPRCM.RSTCTL =
696  (RTC_RSTCTL_KEY_UNLOCK_W | RTC_RSTCTL_RESETSTKYCLR_CLR |
697  RTC_RSTCTL_RESETASSERT_ASSERT);
698 }
699 
709 __STATIC_INLINE bool DL_RTC_Common_isReset(const RTC_Regs *rtc_common)
710 {
711  return ((rtc_common->GPRCM.STAT & RTC_STAT_RESETSTKY_MASK) ==
712  RTC_STAT_RESETSTKY_RESET);
713 }
714 
722 __STATIC_INLINE void DL_RTC_Common_enableDebugInterrupts(RTC_Regs *rtc_common)
723 {
724  rtc_common->DBGCTL |= RTC_DBGCTL_DBGINT_ON;
725 }
726 
735 __STATIC_INLINE void DL_RTC_Common_disableDebugInterrupts(RTC_Regs *rtc_common)
736 {
737  rtc_common->DBGCTL &= ~(RTC_DBGCTL_DBGINT_MASK);
738 }
739 
746 __STATIC_INLINE void DL_RTC_Common_enableDebugMode(RTC_Regs *rtc_common)
747 {
748  rtc_common->DBGCTL |= RTC_DBGCTL_DBGRUN_RUN;
749 }
750 
757 __STATIC_INLINE void DL_RTC_Common_disableDebugMode(RTC_Regs *rtc_common)
758 {
759  rtc_common->DBGCTL &= ~(RTC_DBGCTL_DBGRUN_MASK);
760 }
761 
771 __STATIC_INLINE void DL_RTC_Common_setClockFormat(
772  RTC_Regs *rtc_common, DL_RTC_COMMON_FORMAT formatSelect)
773 {
774  rtc_common->CTL |= (uint32_t) formatSelect;
775 }
776 
787 __STATIC_INLINE DL_RTC_COMMON_FORMAT DL_RTC_Common_getClockFormat(
788  const RTC_Regs *rtc_common)
789 {
790  uint32_t format = (rtc_common->CTL & RTC_CTL_RTCBCD_MASK);
791 
792  return (DL_RTC_COMMON_FORMAT)(format);
793 }
794 
811 __STATIC_INLINE void DL_RTC_Common_setIntervalAlarm(
812  RTC_Regs *rtc_common, DL_RTC_COMMON_INTERVAL_ALARM alarmEvent)
813 {
815  &rtc_common->CTL, (uint32_t) alarmEvent, RTC_CTL_RTCTEVTX_MASK);
816 }
817 
832 __STATIC_INLINE DL_RTC_COMMON_INTERVAL_ALARM DL_RTC_Common_getIntervalAlarm(
833  const RTC_Regs *rtc_common)
834 {
835  uint32_t alarm = (rtc_common->CTL & RTC_CTL_RTCTEVTX_MASK);
836 
837  return (DL_RTC_COMMON_INTERVAL_ALARM)(alarm);
838 }
839 
857 __STATIC_INLINE bool DL_RTC_Common_isSafeToRead(const RTC_Regs *rtc_common)
858 {
859  return ((rtc_common->STA & RTC_STA_RTCRDY_MASK) == RTC_STA_RTCRDY_READY);
860 }
861 
871 __STATIC_INLINE bool DL_RTC_Common_isReadyToCalibrate(
872  const RTC_Regs *rtc_common)
873 {
874  return (
875  (rtc_common->STA & RTC_STA_RTCTCRDY_MASK) == RTC_STA_RTCTCRDY_READY);
876 }
877 
888  const RTC_Regs *rtc_common)
889 {
890  return ((rtc_common->STA & RTC_STA_RTCTCOK_MASK) == RTC_STA_RTCTCOK_OK);
891 }
892 
906  RTC_Regs *rtc_common,
907  DL_RTC_COMMON_OFFSET_CALIBRATION_FREQUENCY offsetFrequency)
908 {
910  &rtc_common->CAL, (uint32_t) offsetFrequency, RTC_CAL_RTCCALFX_MASK);
911 }
912 
929  RTC_Regs *rtc_common, DL_RTC_COMMON_OFFSET_CALIBRATION_SIGN offsetSign,
930  uint8_t offsetValue)
931 {
932  DL_Common_updateReg(&rtc_common->CAL,
933  ((uint32_t) offsetSign | (uint32_t) offsetValue),
934  (RTC_CAL_RTCOCALX_MASK | RTC_CAL_RTCOCALS_MASK));
935 }
936 
959 __STATIC_INLINE void DL_RTC_Common_setOffsetCalibration(RTC_Regs *rtc_common,
960  DL_RTC_COMMON_OFFSET_CALIBRATION_FREQUENCY offsetFrequency,
961  DL_RTC_COMMON_OFFSET_CALIBRATION_SIGN offsetSign, uint8_t offsetValue)
962 {
963  rtc_common->CAL = (offsetValue & RTC_CAL_RTCOCALX_MASK) |
964  (uint32_t) offsetFrequency | (uint32_t) offsetSign;
965 }
966 
976 __STATIC_INLINE DL_RTC_COMMON_OFFSET_CALIBRATION_FREQUENCY
978 {
979  uint32_t freq = (rtc_common->CAL & RTC_CAL_RTCCALFX_MASK);
980 
981  return (DL_RTC_COMMON_OFFSET_CALIBRATION_FREQUENCY)(freq);
982 }
983 
993 __STATIC_INLINE DL_RTC_COMMON_OFFSET_CALIBRATION_SIGN
994 DL_RTC_Common_getOffsetCalibrationSign(const RTC_Regs *rtc_common)
995 {
996  uint32_t sign = (rtc_common->CAL & RTC_CAL_RTCOCALS_MASK);
997 
998  return (DL_RTC_COMMON_OFFSET_CALIBRATION_SIGN)(sign);
999 }
1000 
1018  RTC_Regs *rtc_common, DL_RTC_COMMON_TEMP_CALIBRATION offsetDirection,
1019  uint32_t offsetValue)
1020 {
1021  rtc_common->TCMP =
1022  (offsetValue & RTC_TCMP_RTCTCMPX_MASK) | (uint32_t) offsetDirection;
1023 }
1024 
1037  const RTC_Regs *rtc_common)
1038 {
1039  return (rtc_common->TCMP);
1040 }
1041 
1050  RTC_Regs *rtc_common, uint8_t seconds)
1051 {
1052  rtc_common->SEC = ((uint32_t) seconds << RTC_SEC_SECLOWBCD_OFS) &
1053  (RTC_SEC_SECLOWBCD_MASK | RTC_SEC_SECHIGHBCD_MASK);
1054 }
1055 
1070 __STATIC_INLINE uint8_t DL_RTC_Common_getCalendarSecondsBCD(
1071  const RTC_Regs *rtc_common)
1072 {
1073  return (uint8_t)((rtc_common->SEC &
1074  (RTC_SEC_SECLOWBCD_MASK | RTC_SEC_SECHIGHBCD_MASK)) >>
1075  RTC_SEC_SECLOWBCD_OFS);
1076 }
1077 
1086  RTC_Regs *rtc_common, uint8_t minutes)
1087 {
1088  rtc_common->MIN = ((uint32_t) minutes << RTC_MIN_MINLOWBCD_OFS) &
1089  (RTC_MIN_MINLOWBCD_MASK | RTC_MIN_MINHIGHBCD_MASK);
1090 }
1091 
1106 __STATIC_INLINE uint8_t DL_RTC_Common_getCalendarMinutesBCD(
1107  const RTC_Regs *rtc_common)
1108 {
1109  return (uint8_t)((rtc_common->MIN &
1110  (RTC_MIN_MINLOWBCD_MASK | RTC_MIN_MINHIGHBCD_MASK)) >>
1111  RTC_MIN_MINLOWBCD_OFS);
1112 }
1113 
1122  RTC_Regs *rtc_common, uint8_t hours)
1123 {
1124  rtc_common->HOUR = ((uint32_t) hours << RTC_HOUR_HOURLOWBCD_OFS) &
1125  (RTC_HOUR_HOURLOWBCD_MASK | RTC_HOUR_HOURHIGHBCD_MASK);
1126 }
1127 
1142 __STATIC_INLINE uint8_t DL_RTC_Common_getCalendarHoursBCD(
1143  const RTC_Regs *rtc_common)
1144 {
1145  return (uint8_t)((rtc_common->HOUR & (RTC_HOUR_HOURLOWBCD_MASK |
1146  RTC_HOUR_HOURHIGHBCD_MASK)) >>
1147  RTC_HOUR_HOURLOWBCD_OFS);
1148 }
1149 
1158  RTC_Regs *rtc_common, uint8_t day)
1159 {
1160  DL_Common_updateReg(&rtc_common->DAY, day, RTC_DAY_DOW_MASK);
1161 }
1162 
1178  const RTC_Regs *rtc_common)
1179 {
1180  return (uint8_t)(rtc_common->DAY & RTC_DAY_DOW_MASK);
1181 }
1182 
1191  RTC_Regs *rtc_common, uint8_t day)
1192 {
1193  DL_Common_updateReg(&rtc_common->DAY,
1194  (uint32_t) day << RTC_DAY_DOMLOWBCD_OFS,
1195  (RTC_DAY_DOMLOWBCD_MASK | RTC_DAY_DOMHIGHBCD_MASK));
1196 }
1197 
1213  const RTC_Regs *rtc_common)
1214 {
1215  return (uint8_t)((rtc_common->DAY &
1216  (RTC_DAY_DOMLOWBCD_MASK | RTC_DAY_DOMHIGHBCD_MASK)) >>
1217  RTC_DAY_DOMLOWBCD_OFS);
1218 }
1219 
1228  RTC_Regs *rtc_common, uint8_t month)
1229 {
1230  rtc_common->MON = ((uint32_t) month << RTC_MON_MONLOWBCD_OFS) &
1231  (RTC_MON_MONLOWBCD_MASK | RTC_MON_MONHIGHBCD_MASK);
1232 }
1233 
1248 __STATIC_INLINE uint8_t DL_RTC_Common_getCalendarMonthBCD(
1249  const RTC_Regs *rtc_common)
1250 {
1251  return (uint8_t)((rtc_common->MON &
1252  (RTC_MON_MONLOWBCD_MASK | RTC_MON_MONHIGHBCD_MASK)) >>
1253  RTC_MON_MONLOWBCD_OFS);
1254 }
1255 
1264  RTC_Regs *rtc_common, uint16_t year)
1265 {
1266  rtc_common->YEAR =
1267  ((uint32_t) year << RTC_YEAR_YEARLOWESTBCD_OFS) &
1268  (RTC_YEAR_YEARLOWESTBCD_MASK | RTC_YEAR_DECADEBCD_MASK |
1269  RTC_YEAR_CENTLOWBCD_MASK | RTC_YEAR_CENTHIGHBCD_MASK);
1270 }
1271 
1286 __STATIC_INLINE uint16_t DL_RTC_Common_getCalendarYearBCD(
1287  const RTC_Regs *rtc_common)
1288 {
1289  return (uint16_t)(
1290  (rtc_common->YEAR &
1291  (RTC_YEAR_YEARLOWESTBCD_MASK | RTC_YEAR_DECADEBCD_MASK |
1292  RTC_YEAR_CENTLOWBCD_MASK | RTC_YEAR_CENTHIGHBCD_MASK)) >>
1293  RTC_YEAR_YEARLOWESTBCD_OFS);
1294 }
1295 
1302 __STATIC_INLINE void DL_RTC_Common_enableAlarm1MinutesBCD(RTC_Regs *rtc_common)
1303 {
1304  rtc_common->A1MIN |= RTC_A1MIN_AMINAEBCD_ENABLE;
1305 }
1306 
1314  RTC_Regs *rtc_common)
1315 {
1316  rtc_common->A1MIN &= ~(RTC_A1MIN_AMINAEBCD_MASK);
1317 }
1318 
1328  RTC_Regs *rtc_common, uint8_t minutes)
1329 {
1330  rtc_common->A1MIN =
1331  ((uint32_t) minutes << RTC_A1MIN_AMINLOWBCD_OFS) &
1332  (RTC_A1MIN_AMINLOWBCD_MASK | RTC_A1MIN_AMINHIGHBCD_MASK);
1333 }
1334 
1345 __STATIC_INLINE uint8_t DL_RTC_Common_getAlarm1MinutesBCD(
1346  const RTC_Regs *rtc_common)
1347 {
1348  return (uint8_t)((rtc_common->A1MIN & (RTC_A1MIN_AMINLOWBCD_MASK |
1349  RTC_A1MIN_AMINHIGHBCD_MASK)) >>
1350  RTC_A1MIN_AMINLOWBCD_OFS);
1351 }
1352 
1359 __STATIC_INLINE void DL_RTC_Common_enableAlarm1HoursBCD(RTC_Regs *rtc_common)
1360 {
1361  rtc_common->A1HOUR |= RTC_A1HOUR_AHOURAEBIN_ENABLE;
1362 }
1363 
1370 __STATIC_INLINE void DL_RTC_Common_disableAlarm1HoursBCD(RTC_Regs *rtc_common)
1371 {
1372  rtc_common->A1HOUR &= ~(RTC_A1HOUR_AHOURAEBIN_MASK);
1373 }
1374 
1382 __STATIC_INLINE void DL_RTC_Common_setAlarm1HoursBCD(
1383  RTC_Regs *rtc_common, uint8_t hours)
1384 {
1385  rtc_common->A1HOUR =
1386  ((uint32_t) hours << RTC_A1HOUR_AHOURLOWBCD_OFS) &
1387  (RTC_A1HOUR_AHOURLOWBCD_MASK | RTC_A1HOUR_AHOURHIGHBCD_MASK);
1388 }
1389 
1400 __STATIC_INLINE uint8_t DL_RTC_Common_getAlarm1HoursBCD(
1401  const RTC_Regs *rtc_common)
1402 {
1403  return (uint8_t)(
1404  (rtc_common->A1HOUR &
1405  (RTC_A1HOUR_AHOURLOWBCD_MASK | RTC_A1HOUR_AHOURHIGHBCD_MASK)) >>
1406  RTC_A1HOUR_AHOURLOWBCD_OFS);
1407 }
1408 
1416  RTC_Regs *rtc_common)
1417 {
1418  rtc_common->A1DAY |= RTC_A1DAY_ADOWAE_ENABLE;
1419 }
1420 
1428  RTC_Regs *rtc_common)
1429 {
1430  rtc_common->A1DAY &= ~(RTC_A1DAY_ADOWAE_MASK);
1431 }
1432 
1441  RTC_Regs *rtc_common, uint8_t day)
1442 {
1443  DL_Common_updateReg(&rtc_common->A1DAY, day, RTC_A1DAY_ADOW_MASK);
1444 }
1445 
1456 __STATIC_INLINE uint8_t DL_RTC_Common_getAlarm1DayOfWeekBCD(
1457  const RTC_Regs *rtc_common)
1458 {
1459  return (uint8_t)(rtc_common->DAY & RTC_A1DAY_ADOW_MASK);
1460 }
1461 
1469  RTC_Regs *rtc_common)
1470 {
1471  rtc_common->A1DAY |= RTC_A1DAY_ADOMAEBCD_ENABLE;
1472 }
1473 
1481  RTC_Regs *rtc_common)
1482 {
1483  rtc_common->A1DAY &= ~(RTC_A1DAY_ADOMAEBCD_MASK);
1484 }
1485 
1494  RTC_Regs *rtc_common, uint8_t day)
1495 {
1496  DL_Common_updateReg(&rtc_common->A1DAY,
1497  (uint32_t) day << RTC_A1DAY_ADOMLOWBCD_OFS,
1498  (RTC_A1DAY_ADOMLOWBCD_MASK | RTC_A1DAY_ADOMHIGHBCD_MASK));
1499 }
1500 
1512  const RTC_Regs *rtc_common)
1513 {
1514  return (uint8_t)((rtc_common->A1DAY & (RTC_A1DAY_ADOMLOWBCD_MASK |
1515  RTC_A1DAY_ADOMHIGHBCD_MASK)) >>
1516  RTC_A1DAY_ADOMLOWBCD_OFS);
1517 }
1518 
1525 __STATIC_INLINE void DL_RTC_Common_enableAlarm2MinutesBCD(RTC_Regs *rtc_common)
1526 {
1527  rtc_common->A2MIN |= RTC_A2MIN_AMINAEBCD_ENABLE;
1528 }
1529 
1537  RTC_Regs *rtc_common)
1538 {
1539  rtc_common->A2MIN &= ~(RTC_A2MIN_AMINAEBCD_MASK);
1540 }
1541 
1551  RTC_Regs *rtc_common, uint8_t minutes)
1552 {
1553  rtc_common->A2MIN =
1554  ((uint32_t) minutes << RTC_A2MIN_AMINLOWBCD_OFS) &
1555  (RTC_A2MIN_AMINLOWBCD_MASK | RTC_A2MIN_AMINHIGHBCD_MASK);
1556 }
1557 
1568 __STATIC_INLINE uint8_t DL_RTC_Common_getAlarm2MinutesBCD(
1569  const RTC_Regs *rtc_common)
1570 {
1571  return (uint8_t)((rtc_common->A2MIN & (RTC_A2MIN_AMINLOWBCD_MASK |
1572  RTC_A2MIN_AMINHIGHBCD_MASK)) >>
1573  RTC_A2MIN_AMINLOWBCD_OFS);
1574 }
1575 
1582 __STATIC_INLINE void DL_RTC_Common_enableAlarm2HoursBCD(RTC_Regs *rtc_common)
1583 {
1584  rtc_common->A2HOUR |= RTC_A2HOUR_AHOURAEBIN_ENABLE;
1585 }
1586 
1593 __STATIC_INLINE void DL_RTC_Common_disableAlarm2HoursBCD(RTC_Regs *rtc_common)
1594 {
1595  rtc_common->A2HOUR &= ~(RTC_A2HOUR_AHOURAEBIN_MASK);
1596 }
1597 
1605 __STATIC_INLINE void DL_RTC_Common_setAlarm2HoursBCD(
1606  RTC_Regs *rtc_common, uint8_t hours)
1607 {
1608  rtc_common->A2HOUR =
1609  ((uint32_t) hours << RTC_A2HOUR_AHOURLOWBCD_OFS) &
1610  (RTC_A2HOUR_AHOURLOWBCD_MASK | RTC_A2HOUR_AHOURHIGHBCD_MASK);
1611 }
1612 
1623 __STATIC_INLINE uint8_t DL_RTC_Common_getAlarm2HoursBCD(
1624  const RTC_Regs *rtc_common)
1625 {
1626  return (uint8_t)(
1627  (rtc_common->A2HOUR &
1628  (RTC_A2HOUR_AHOURLOWBCD_MASK | RTC_A2HOUR_AHOURHIGHBCD_MASK)) >>
1629  RTC_A2HOUR_AHOURLOWBCD_OFS);
1630 }
1631 
1639  RTC_Regs *rtc_common)
1640 {
1641  rtc_common->A2DAY |= RTC_A2DAY_ADOWAE_ENABLE;
1642 }
1643 
1651  RTC_Regs *rtc_common)
1652 {
1653  rtc_common->A2DAY &= ~(RTC_A2DAY_ADOWAE_MASK);
1654 }
1655 
1664  RTC_Regs *rtc_common, uint8_t day)
1665 {
1666  DL_Common_updateReg(&rtc_common->A2DAY, day, RTC_A2DAY_ADOW_MASK);
1667 }
1668 
1679 __STATIC_INLINE uint8_t DL_RTC_Common_getAlarm2DayOfWeekBCD(
1680  const RTC_Regs *rtc_common)
1681 {
1682  return (uint8_t)(rtc_common->DAY & RTC_A2DAY_ADOW_MASK);
1683 }
1684 
1692  RTC_Regs *rtc_common)
1693 {
1694  rtc_common->A2DAY |= RTC_A2DAY_ADOMAEBCD_ENABLE;
1695 }
1696 
1704  RTC_Regs *rtc_common)
1705 {
1706  rtc_common->A2DAY &= ~(RTC_A2DAY_ADOMAEBCD_MASK);
1707 }
1708 
1717  RTC_Regs *rtc_common, uint8_t day)
1718 {
1719  DL_Common_updateReg(&rtc_common->A2DAY,
1720  (uint32_t) day << RTC_A2DAY_ADOMLOWBCD_OFS,
1721  (RTC_A2DAY_ADOMLOWBCD_MASK | RTC_A2DAY_ADOMHIGHBCD_MASK));
1722 }
1723 
1735  const RTC_Regs *rtc_common)
1736 {
1737  return (uint8_t)((rtc_common->A2DAY & (RTC_A2DAY_ADOMLOWBCD_MASK |
1738  RTC_A2DAY_ADOMHIGHBCD_MASK)) >>
1739  RTC_A2DAY_ADOMLOWBCD_OFS);
1740 }
1741 
1750  RTC_Regs *rtc_common, uint8_t seconds)
1751 {
1752  rtc_common->SEC = (seconds & RTC_SEC_SECBIN_MASK);
1753 }
1754 
1770  const RTC_Regs *rtc_common)
1771 {
1772  return (uint8_t)(rtc_common->SEC & RTC_SEC_SECBIN_MASK);
1773 }
1774 
1783  RTC_Regs *rtc_common, uint8_t minutes)
1784 {
1785  rtc_common->MIN = (minutes & RTC_MIN_MINBIN_MASK);
1786 }
1787 
1803  const RTC_Regs *rtc_common)
1804 {
1805  return (uint8_t)(rtc_common->MIN & RTC_MIN_MINBIN_MASK);
1806 }
1807 
1816  RTC_Regs *rtc_common, uint8_t hours)
1817 {
1818  rtc_common->HOUR = (hours & RTC_HOUR_HOURBIN_MASK);
1819 }
1820 
1836  const RTC_Regs *rtc_common)
1837 {
1838  return (uint8_t)(rtc_common->HOUR & RTC_HOUR_HOURBIN_MASK);
1839 }
1840 
1849  RTC_Regs *rtc_common, uint8_t day)
1850 {
1851  DL_Common_updateReg(&rtc_common->DAY, day, RTC_DAY_DOW_MASK);
1852 }
1853 
1869  const RTC_Regs *rtc_common)
1870 {
1871  return (uint8_t)(rtc_common->DAY & RTC_DAY_DOW_MASK);
1872 }
1873 
1882  RTC_Regs *rtc_common, uint8_t day)
1883 {
1884  DL_Common_updateReg(&rtc_common->DAY, (uint32_t) day << RTC_DAY_DOMBIN_OFS,
1885  RTC_DAY_DOMBIN_MASK);
1886 }
1887 
1903  const RTC_Regs *rtc_common)
1904 {
1905  return (uint8_t)(
1906  (rtc_common->DAY & RTC_DAY_DOMBIN_MASK) >> RTC_DAY_DOMBIN_OFS);
1907 }
1908 
1917  RTC_Regs *rtc_common, uint8_t month)
1918 {
1919  rtc_common->MON = (month & RTC_MON_MONBIN_MASK);
1920 }
1921 
1937  const RTC_Regs *rtc_common)
1938 {
1939  return (uint8_t)(rtc_common->MON & RTC_MON_MONBIN_MASK);
1940 }
1941 
1950  RTC_Regs *rtc_common, uint16_t year)
1951 {
1952  rtc_common->YEAR = ((uint32_t) year & (RTC_YEAR_YEARLOWBIN_MASK |
1953  RTC_YEAR_YEARHIGHBIN_MASK));
1954 }
1955 
1970 __STATIC_INLINE uint16_t DL_RTC_Common_getCalendarYearBinary(
1971  const RTC_Regs *rtc_common)
1972 {
1973  return (uint16_t)(rtc_common->YEAR &
1974  (RTC_YEAR_YEARLOWBIN_MASK | RTC_YEAR_YEARHIGHBIN_MASK));
1975 }
1976 
1984  RTC_Regs *rtc_common)
1985 {
1986  rtc_common->A1MIN |= RTC_A1MIN_AMINAEBIN_ENABLE;
1987 }
1988 
1996  RTC_Regs *rtc_common)
1997 {
1998  rtc_common->A1MIN &= ~(RTC_A1MIN_AMINAEBIN_MASK);
1999 }
2000 
2010  RTC_Regs *rtc_common, uint8_t minutes)
2011 {
2012  rtc_common->A1MIN = (minutes & RTC_A1MIN_AMINBIN_MASK);
2013 }
2014 
2026  const RTC_Regs *rtc_common)
2027 {
2028  return (uint8_t)(rtc_common->A1MIN & RTC_A1MIN_AMINBIN_MASK);
2029 }
2030 
2038  RTC_Regs *rtc_common)
2039 {
2040  rtc_common->A1HOUR |= RTC_A1HOUR_AHOURAEBIN_ENABLE;
2041 }
2042 
2050  RTC_Regs *rtc_common)
2051 {
2052  rtc_common->A1HOUR &= ~(RTC_A1HOUR_AHOURAEBIN_MASK);
2053 }
2054 
2063  RTC_Regs *rtc_common, uint8_t hours)
2064 {
2065  rtc_common->A1HOUR = (hours & RTC_A1HOUR_AHOURBIN_MASK);
2066 }
2067 
2078 __STATIC_INLINE uint8_t DL_RTC_Common_getAlarm1HoursBinary(
2079  const RTC_Regs *rtc_common)
2080 {
2081  return (uint8_t)(rtc_common->A1HOUR & RTC_A1HOUR_AHOURBIN_MASK);
2082 }
2083 
2091  RTC_Regs *rtc_common)
2092 {
2093  rtc_common->A1DAY |= RTC_A1DAY_ADOWAE_ENABLE;
2094 }
2095 
2103  RTC_Regs *rtc_common)
2104 {
2105  rtc_common->A1DAY &= ~(RTC_A1DAY_ADOWAE_MASK);
2106 }
2107 
2116  RTC_Regs *rtc_common, uint8_t day)
2117 {
2118  DL_Common_updateReg(&rtc_common->A1DAY, day, RTC_A1DAY_ADOW_MASK);
2119 }
2120 
2132  const RTC_Regs *rtc_common)
2133 {
2134  return (uint8_t)(rtc_common->A1DAY & RTC_A1DAY_ADOW_MASK);
2135 }
2136 
2144  RTC_Regs *rtc_common)
2145 {
2146  rtc_common->A1DAY |= RTC_A1DAY_ADOMAEBIN_ENABLE;
2147 }
2148 
2156  RTC_Regs *rtc_common)
2157 {
2158  rtc_common->A1DAY &= ~(RTC_A1DAY_ADOMAEBIN_MASK);
2159 }
2160 
2169  RTC_Regs *rtc_common, uint8_t day)
2170 {
2171  DL_Common_updateReg(&rtc_common->A1DAY,
2172  (uint32_t) day << RTC_A1DAY_ADOMBIN_OFS, RTC_A1DAY_ADOMBIN_MASK);
2173 }
2174 
2186  const RTC_Regs *rtc_common)
2187 {
2188  return (uint8_t)(
2189  (rtc_common->A1DAY & RTC_A1DAY_ADOMBIN_MASK) >> RTC_A1DAY_ADOMBIN_OFS);
2190 }
2191 
2199  RTC_Regs *rtc_common)
2200 {
2201  rtc_common->A2MIN |= RTC_A2MIN_AMINAEBIN_ENABLE;
2202 }
2203 
2211  RTC_Regs *rtc_common)
2212 {
2213  rtc_common->A2MIN &= ~(RTC_A2MIN_AMINAEBIN_MASK);
2214 }
2215 
2225  RTC_Regs *rtc_common, uint8_t minutes)
2226 {
2227  rtc_common->A2MIN = (minutes & RTC_A2MIN_AMINBIN_MASK);
2228 }
2229 
2241  const RTC_Regs *rtc_common)
2242 {
2243  return (uint8_t)(rtc_common->A2MIN & RTC_A2MIN_AMINBIN_MASK);
2244 }
2245 
2253  RTC_Regs *rtc_common)
2254 {
2255  rtc_common->A2HOUR |= RTC_A2HOUR_AHOURAEBIN_ENABLE;
2256 }
2257 
2265  RTC_Regs *rtc_common)
2266 {
2267  rtc_common->A2HOUR &= ~(RTC_A2HOUR_AHOURAEBIN_MASK);
2268 }
2269 
2278  RTC_Regs *rtc_common, uint8_t hours)
2279 {
2280  rtc_common->A2HOUR = (hours & RTC_A2HOUR_AHOURBIN_MASK);
2281 }
2282 
2293 __STATIC_INLINE uint8_t DL_RTC_Common_getAlarm2HoursBinary(
2294  const RTC_Regs *rtc_common)
2295 {
2296  return (uint8_t)(rtc_common->A2HOUR & RTC_A2HOUR_AHOURBIN_MASK);
2297 }
2298 
2306  RTC_Regs *rtc_common)
2307 {
2308  rtc_common->A2DAY |= RTC_A2DAY_ADOWAE_ENABLE;
2309 }
2310 
2318  RTC_Regs *rtc_common)
2319 {
2320  rtc_common->A2DAY &= ~(RTC_A2DAY_ADOWAE_MASK);
2321 }
2322 
2331  RTC_Regs *rtc_common, uint8_t day)
2332 {
2333  DL_Common_updateReg(&rtc_common->A2DAY, day, RTC_A2DAY_ADOW_MASK);
2334 }
2335 
2347  const RTC_Regs *rtc_common)
2348 {
2349  return (uint8_t)(rtc_common->A2DAY & RTC_A2DAY_ADOW_MASK);
2350 }
2351 
2359  RTC_Regs *rtc_common)
2360 {
2361  rtc_common->A2DAY |= RTC_A2DAY_ADOMAEBIN_ENABLE;
2362 }
2363 
2371  RTC_Regs *rtc_common)
2372 {
2373  rtc_common->A2DAY &= ~(RTC_A2DAY_ADOMAEBIN_MASK);
2374 }
2375 
2384  RTC_Regs *rtc_common, uint8_t day)
2385 {
2386  DL_Common_updateReg(&rtc_common->A2DAY,
2387  (uint32_t) day << RTC_A2DAY_ADOMBIN_OFS, RTC_A2DAY_ADOMBIN_MASK);
2388 }
2389 
2401  const RTC_Regs *rtc_common)
2402 {
2403  return (uint8_t)(
2404  (rtc_common->A2DAY & RTC_A2DAY_ADOMBIN_MASK) >> RTC_A2DAY_ADOMBIN_OFS);
2405 }
2406 
2426 __STATIC_INLINE void DL_RTC_Common_setPrescalerEvents(RTC_Regs *rtc_common,
2427  DL_RTC_COMMON_PRESCALER0_DIVIDE prescaler0Divider,
2428  DL_RTC_COMMON_PRESCALER1_DIVIDE prescaler1Divider,
2429  DL_RTC_COMMON_PRESCALER2_DIVIDE prescaler2Divider)
2430 {
2431  rtc_common->PSCTL =
2432  (((uint32_t) prescaler0Divider & RTC_PSCTL_RT0IP_MASK) |
2433  ((uint32_t) prescaler1Divider & RTC_PSCTL_RT1IP_MASK));
2434  rtc_common->EXTPSCTL =
2435  ((uint32_t) prescaler2Divider & RTC_EXTPSCTL_RT2PS_MASK);
2436 }
2437 
2447 __STATIC_INLINE void DL_RTC_Common_setPeriodicAlarm0(
2448  RTC_Regs *rtc_common, DL_RTC_COMMON_PRESCALER0_DIVIDE prescaler0Divider)
2449 {
2450  DL_Common_updateReg(&rtc_common->PSCTL, (uint32_t) prescaler0Divider,
2451  RTC_PSCTL_RT0IP_MASK);
2452 }
2453 
2463 __STATIC_INLINE void DL_RTC_Common_setPeriodicAlarm1(
2464  RTC_Regs *rtc_common, DL_RTC_COMMON_PRESCALER1_DIVIDE prescaler1Divider)
2465 {
2466  DL_Common_updateReg(&rtc_common->PSCTL, (uint32_t) prescaler1Divider,
2467  RTC_PSCTL_RT1IP_MASK);
2468 }
2469 
2478 __STATIC_INLINE void DL_RTC_Common_setPeriodicAlarm2(
2479  RTC_Regs *rtc_common, DL_RTC_COMMON_PRESCALER2_DIVIDE prescaler2Divider)
2480 {
2481  DL_Common_updateReg(&rtc_common->EXTPSCTL, (uint32_t) prescaler2Divider,
2482  RTC_EXTPSCTL_RT2PS_MASK);
2483 }
2484 
2495 __STATIC_INLINE DL_RTC_COMMON_PRESCALER0_DIVIDE DL_RTC_Common_getPrescaler0(
2496  const RTC_Regs *rtc_common)
2497 {
2498  uint32_t prescaler = (rtc_common->PSCTL & RTC_PSCTL_RT0IP_MASK);
2499 
2500  return (DL_RTC_COMMON_PRESCALER0_DIVIDE)(prescaler);
2501 }
2502 
2512 __STATIC_INLINE DL_RTC_COMMON_PRESCALER1_DIVIDE DL_RTC_Common_getPrescaler1(
2513  const RTC_Regs *rtc_common)
2514 {
2515  uint32_t prescaler = (rtc_common->PSCTL & RTC_PSCTL_RT1IP_MASK);
2516 
2517  return (DL_RTC_COMMON_PRESCALER1_DIVIDE)(prescaler);
2518 }
2519 
2529 __STATIC_INLINE DL_RTC_COMMON_PRESCALER2_DIVIDE DL_RTC_Common_getPrescaler2(
2530  const RTC_Regs *rtc_common)
2531 {
2532  uint32_t prescaler = (rtc_common->EXTPSCTL & RTC_EXTPSCTL_RT2PS_MASK);
2533 
2534  return (DL_RTC_COMMON_PRESCALER2_DIVIDE)(prescaler);
2535 }
2536 
2552  const RTC_Regs *rtc_common)
2553 {
2554  return (uint8_t)((rtc_common->TSSEC & (RTC_TSSEC_SECLOWBCD_MASK |
2555  RTC_TSSEC_SECHIGHBCD_MASK)) >>
2556  RTC_TSSEC_SECLOWBCD_OFS);
2557 }
2558 
2574  const RTC_Regs *rtc_common)
2575 {
2576  return (uint8_t)((rtc_common->TSMIN & (RTC_TSMIN_MINLOWBCD_MASK |
2577  RTC_TSMIN_MINHIGHBCD_MASK)) >>
2578  RTC_TSMIN_MINLOWBCD_OFS);
2579 }
2580 
2595 __STATIC_INLINE uint8_t DL_RTC_Common_getTimeStampHoursBCD(
2596  const RTC_Regs *rtc_common)
2597 {
2598  return (uint8_t)((rtc_common->TSHOUR & (RTC_TSHOUR_HOURLOWBCD_MASK |
2599  RTC_TSHOUR_HOURHIGHBCD_MASK)) >>
2600  RTC_TSHOUR_HOURLOWBCD_OFS);
2601 }
2602 
2618  const RTC_Regs *rtc_common)
2619 {
2620  return (uint8_t)(rtc_common->TSDAY & RTC_TSDAY_DOW_MASK);
2621 }
2622 
2638  const RTC_Regs *rtc_common)
2639 {
2640  return (uint8_t)((rtc_common->TSDAY & (RTC_TSDAY_DOMLOWBCD_MASK |
2641  RTC_TSDAY_DOMHIGHBCD_MASK)) >>
2642  RTC_TSDAY_DOMLOWBCD_OFS);
2643 }
2644 
2659 __STATIC_INLINE uint8_t DL_RTC_Common_getTimeStampMonthBCD(
2660  const RTC_Regs *rtc_common)
2661 {
2662  return (uint8_t)((rtc_common->TSMON & (RTC_TSMON_MONLOWBCD_MASK |
2663  RTC_TSMON_MONHIGHBCD_MASK)) >>
2664  RTC_TSMON_MONLOWBCD_OFS);
2665 }
2666 
2681 __STATIC_INLINE uint16_t DL_RTC_Common_getTimeStampYearBCD(
2682  const RTC_Regs *rtc_common)
2683 {
2684  return (uint16_t)(
2685  (rtc_common->TSYEAR &
2686  (RTC_TSYEAR_YERARLOWESTBCD_MASK | RTC_TSYEAR_DECADEBCD_MASK |
2687  RTC_TSYEAR_CENTLOWBCD_MASK | RTC_TSYEAR_CENTHIGHBCD_MASK)) >>
2688  RTC_TSYEAR_YERARLOWESTBCD_OFS);
2689 }
2690 
2705  const RTC_Regs *rtc_common)
2706 {
2707  return (uint8_t)(rtc_common->TSSEC & RTC_TSSEC_SECBIN_MASK);
2708 }
2709 
2725  const RTC_Regs *rtc_common)
2726 {
2727  return (uint8_t)(rtc_common->TSMIN & RTC_TSMIN_MINBIN_MASK);
2728 }
2729 
2745  const RTC_Regs *rtc_common)
2746 {
2747  return (uint8_t)(rtc_common->TSHOUR & RTC_TSHOUR_HOURBIN_MASK);
2748 }
2749 
2765  const RTC_Regs *rtc_common)
2766 {
2767  return (uint8_t)(rtc_common->TSDAY & RTC_TSDAY_DOW_MASK);
2768 }
2769 
2785  const RTC_Regs *rtc_common)
2786 {
2787  return (uint8_t)(
2788  (rtc_common->TSDAY & RTC_TSDAY_DOMBIN_MASK) >> RTC_TSDAY_DOMBIN_OFS);
2789 }
2790 
2806  const RTC_Regs *rtc_common)
2807 {
2808  return (uint8_t)(rtc_common->TSMON & RTC_TSMON_MONBIN_MASK);
2809 }
2810 
2825 __STATIC_INLINE uint16_t DL_RTC_Common_getTimeStampYearBinary(
2826  const RTC_Regs *rtc_common)
2827 {
2828  return (uint16_t)(rtc_common->TSYEAR & (RTC_TSYEAR_YEARLOWBIN_MASK |
2829  RTC_TSYEAR_YEARHIGHBIN_MASK));
2830 }
2831 
2840 __STATIC_INLINE void DL_RTC_Common_enableInterrupt(
2841  RTC_Regs *rtc_common, uint32_t interruptMask)
2842 {
2843  rtc_common->CPU_INT.IMASK |= interruptMask;
2844 }
2845 
2854 __STATIC_INLINE void DL_RTC_Common_disableInterrupt(
2855  RTC_Regs *rtc_common, uint32_t interruptMask)
2856 {
2857  rtc_common->CPU_INT.IMASK &= ~(interruptMask);
2858 }
2859 
2872 __STATIC_INLINE uint32_t DL_RTC_Common_getEnabledInterrupts(
2873  const RTC_Regs *rtc_common, uint32_t interruptMask)
2874 {
2875  return (rtc_common->CPU_INT.IMASK & interruptMask);
2876 }
2877 
2896  const RTC_Regs *rtc_common, uint32_t interruptMask)
2897 {
2898  return (rtc_common->CPU_INT.MIS & interruptMask);
2899 }
2900 
2916 __STATIC_INLINE uint32_t DL_RTC_Common_getRawInterruptStatus(
2917  const RTC_Regs *rtc_common, uint32_t interruptMask)
2918 {
2919  return (rtc_common->CPU_INT.RIS & interruptMask);
2920 }
2921 
2934 __STATIC_INLINE DL_RTC_COMMON_IIDX DL_RTC_Common_getPendingInterrupt(
2935  const RTC_Regs *rtc_common)
2936 {
2937  return (DL_RTC_COMMON_IIDX)(rtc_common->CPU_INT.IIDX);
2938 }
2939 
2949  RTC_Regs *rtc_common, uint32_t interruptMask)
2950 {
2951  rtc_common->CPU_INT.ICLR = interruptMask;
2952 }
2953 
2961 __STATIC_INLINE void DL_RTC_Common_enableEvent(
2962  RTC_Regs *rtc_common, uint32_t eventMask)
2963 {
2964  rtc_common->GEN_EVENT.IMASK |= (eventMask);
2965 }
2966 
2974 __STATIC_INLINE void DL_RTC_Common_disableEvent(
2975  RTC_Regs *rtc_common, uint32_t eventMask)
2976 {
2977  rtc_common->GEN_EVENT.IMASK &= ~(eventMask);
2978 }
2979 
2991 __STATIC_INLINE uint32_t DL_RTC_Common_getEnabledEvents(
2992  const RTC_Regs *rtc_common, uint32_t eventMask)
2993 {
2994  return ((rtc_common->GEN_EVENT.IMASK) & (eventMask));
2995 }
2996 
3013 __STATIC_INLINE uint32_t DL_RTC_Common_getEnabledEventStatus(
3014  const RTC_Regs *rtc_common, uint32_t eventMask)
3015 {
3016  return ((rtc_common->GEN_EVENT.MIS) & eventMask);
3017 }
3018 
3033 __STATIC_INLINE uint32_t DL_RTC_Common_getRawEventsStatus(
3034  const RTC_Regs *rtc_common, uint32_t eventMask)
3035 {
3036  return ((rtc_common->GEN_EVENT.RIS) & eventMask);
3037 }
3038 
3046 __STATIC_INLINE void DL_RTC_Common_clearEventsStatus(
3047  RTC_Regs *rtc_common, uint32_t eventMask)
3048 {
3049  rtc_common->GEN_EVENT.ICLR |= (eventMask);
3050 }
3051 
3061  RTC_Regs *rtc_common, uint8_t chanID)
3062 {
3063  rtc_common->FPUB_0 = (chanID & RTC_FPUB_0_CHANID_MAXIMUM);
3064 }
3065 
3075 __STATIC_INLINE uint8_t DL_RTC_Common_getPublisherChanID(
3076  const RTC_Regs *rtc_common)
3077 {
3078  return (uint8_t)(rtc_common->FPUB_0 & RTC_FPUB_0_CHANID_MAXIMUM);
3079 }
3080 
3081 #ifdef __MSPM0_HAS_RTC_A__
3082 
3093 __STATIC_INLINE uint32_t DL_RTC_Common_getTimeStampEventCause(
3094  const RTC_Regs *rtc_common, uint32_t tsEventMask)
3095 {
3096  return (rtc_common->TSSTAT & tsEventMask);
3097 }
3098 #endif
3099 
3112 void DL_RTC_Common_initCalendar(RTC_Regs *rtc_common,
3113  DL_RTC_Common_Calendar calendarTime, DL_RTC_COMMON_FORMAT formatSelect);
3114 
3129  const RTC_Regs *rtc_common);
3130 
3141  RTC_Regs *rtc_common, DL_RTC_Common_CalendarAlarm alarmTime);
3142 
3153  const RTC_Regs *rtc_common);
3154 
3162 void DL_RTC_Common_enableCalendarAlarm1(RTC_Regs *rtc_common);
3163 
3171 void DL_RTC_Common_disableCalendarAlarm1(RTC_Regs *rtc_common);
3172 
3182  RTC_Regs *rtc_common, DL_RTC_Common_CalendarAlarm alarmTime);
3183 
3193  const RTC_Regs *rtc_common);
3194 
3201 void DL_RTC_Common_enableCalendarAlarm2(RTC_Regs *rtc_common);
3202 
3209 void DL_RTC_Common_disableCalendarAlarm2(RTC_Regs *rtc_common);
3210 
3211 #ifdef __MSPM0_HAS_RTC_A__
3212 
3224 __STATIC_INLINE void DL_RTC_Common_setTimeStampEventSource(
3225  RTC_Regs *rtc_common, uint32_t sourceMask)
3226 {
3227  rtc_common->TSCTL |= (RTC_TSCTL_KEY_UNLOCK_W | sourceMask);
3228 }
3229 
3242 __STATIC_INLINE uint32_t DL_RTC_Common_getTimeStampEventSource(
3243  const RTC_Regs *rtc_common, uint32_t sourceMask)
3244 {
3245  return (rtc_common->TSCTL & sourceMask);
3246 }
3247 
3259 __STATIC_INLINE void DL_RTC_Common_setTimeStampEventCapture(
3260  RTC_Regs *rtc_common, DL_RTC_COMMON_TIME_STAMP_EVENT_CAPTURE capture)
3261 {
3262  DL_Common_updateReg(&rtc_common->TSCTL,
3263  (RTC_TSCTL_KEY_UNLOCK_W | (uint32_t) capture),
3264  (RTC_TSCTL_TSCAPTURE_MASK | RTC_TSCTL_KEY_MASK));
3265 }
3266 
3280 __STATIC_INLINE DL_RTC_COMMON_TIME_STAMP_EVENT_CAPTURE
3281 DL_RTC_Common_getTimeStampEventCapture(const RTC_Regs *rtc_common)
3282 {
3283  uint32_t capture = (rtc_common->TSCTL & RTC_TSCTL_TSCAPTURE_MASK);
3284 
3285  return (DL_RTC_COMMON_TIME_STAMP_EVENT_CAPTURE)(capture);
3286 }
3287 
3296 __STATIC_INLINE void DL_RTC_Common_clearTimeStamp(RTC_Regs *rtc_common)
3297 {
3298  rtc_common->TSCLR = (RTC_TSCLR_KEY_UNLOCK_W | RTC_TSCLR_CLR_CLR);
3299 }
3300 
3310 __STATIC_INLINE void DL_RTC_Common_enableWriteProtect(RTC_Regs *rtc_common)
3311 {
3312  rtc_common->RTCLOCK = (RTC_RTCLOCK_PROTECT_SET | RTC_RTCLOCK_KEY_UNLOCK_W);
3313 }
3314 
3326 __STATIC_INLINE bool DL_RTC_Common_isWriteProtectEnabled(
3327  const RTC_Regs *rtc_common)
3328 {
3329  return ((rtc_common->RTCLOCK & RTC_RTCLOCK_PROTECT_MASK) ==
3330  RTC_RTCLOCK_PROTECT_SET);
3331 }
3332 
3339 __STATIC_INLINE void DL_RTC_Common_disableWriteProtect(RTC_Regs *rtc_common)
3340 {
3341  rtc_common->RTCLOCK = (RTC_RTCLOCK_PROTECT_CLR | RTC_RTCLOCK_KEY_UNLOCK_W);
3342 }
3343 #endif
3344 
3345 #ifdef __cplusplus
3346 }
3347 #endif
3348 
3349 #endif /* __MSPM0_HAS_RTC_A__ || __MSPM0_HAS_RTC_B__ || __MSPM0_HAS_RTC__ */
3350 
3351 #endif /* ti_dl_dl_rtc_common__include */
3352 
__STATIC_INLINE uint8_t DL_RTC_Common_getTimeStampDayOfWeekBCD(const RTC_Regs *rtc_common)
Get the day of the week in BCD in the time stamp.
Definition: dl_rtc_common.h:2617
Definition: dl_rtc_common.h:439
__STATIC_INLINE uint8_t DL_RTC_Common_getTimeStampDayOfMonthBCD(const RTC_Regs *rtc_common)
Get the day of the month in BCD in the time stamp.
Definition: dl_rtc_common.h:2637
__STATIC_INLINE uint8_t DL_RTC_Common_getAlarm1DayOfWeekBinary(const RTC_Regs *rtc_common)
Get the day of the week in binary for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:2131
__STATIC_INLINE void DL_RTC_Common_setAlarm1DayOfMonthBCD(RTC_Regs *rtc_common, uint8_t day)
Set the day of the month in BCD for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:1493
__STATIC_INLINE uint8_t DL_RTC_Common_getCalendarHoursBCD(const RTC_Regs *rtc_common)
Get the hours in in BCD the RTC Common calendar.
Definition: dl_rtc_common.h:1142
__STATIC_INLINE void DL_RTC_Common_setCalendarDayOfMonthBinary(RTC_Regs *rtc_common, uint8_t day)
Set the day of the month in binary in the RTC Common calendar.
Definition: dl_rtc_common.h:1881
__STATIC_INLINE uint32_t DL_RTC_Common_getEnabledInterrupts(const RTC_Regs *rtc_common, uint32_t interruptMask)
Check which RTC Common interrupts are enabled.
Definition: dl_rtc_common.h:2872
__STATIC_INLINE void DL_Common_updateReg(volatile uint32_t *reg, uint32_t val, uint32_t mask)
Writes value to specified register - retaining bits unaffected by mask.
Definition: dl_common.h:63
DL_RTC_COMMON_OFFSET_CALIBRATION_FREQUENCY
Definition: dl_rtc_common.h:387
__STATIC_INLINE void DL_RTC_Common_enableDebugMode(RTC_Regs *rtc_common)
Enables the RTC Common modules debug mode.
Definition: dl_rtc_common.h:746
__STATIC_INLINE uint32_t DL_RTC_Common_getRawEventsStatus(const RTC_Regs *rtc_common, uint32_t eventMask)
Check interrupt flag of any RTC Common event.
Definition: dl_rtc_common.h:3033
Definition: dl_rtc_common.h:417
__STATIC_INLINE uint8_t DL_RTC_Common_getPublisherChanID(const RTC_Regs *rtc_common)
Gets the event publisher channel ID.
Definition: dl_rtc_common.h:3075
__STATIC_INLINE void DL_RTC_Common_setPeriodicAlarm0(RTC_Regs *rtc_common, DL_RTC_COMMON_PRESCALER0_DIVIDE prescaler0Divider)
Set periodic alarm 0.
Definition: dl_rtc_common.h:2447
Definition: dl_rtc_common.h:373
__STATIC_INLINE void DL_RTC_Common_setOffsetCalibrationFrequency(RTC_Regs *rtc_common, DL_RTC_COMMON_OFFSET_CALIBRATION_FREQUENCY offsetFrequency)
Sets output frequency for offset calibration.
Definition: dl_rtc_common.h:905
__STATIC_INLINE uint32_t DL_RTC_Common_getEnabledInterruptStatus(const RTC_Regs *rtc_common, uint32_t interruptMask)
Check interrupt flag of enabled RTC Common interrupts.
Definition: dl_rtc_common.h:2895
__STATIC_INLINE uint8_t DL_RTC_Common_getTimeStampSecondsBCD(const RTC_Regs *rtc_common)
Get the seconds in BCD in the time stamp.
Definition: dl_rtc_common.h:2551
uint8_t minutes
Definition: dl_rtc_common.h:577
__STATIC_INLINE uint8_t DL_RTC_Common_getTimeStampMonthBCD(const RTC_Regs *rtc_common)
Get the month of the year in BCD in the time stamp.
Definition: dl_rtc_common.h:2659
__STATIC_INLINE void DL_RTC_Common_setCalendarYearBinary(RTC_Regs *rtc_common, uint16_t year)
Set the year in binary in the RTC Common calendar.
Definition: dl_rtc_common.h:1949
__STATIC_INLINE uint8_t DL_RTC_Common_getAlarm1MinutesBCD(const RTC_Regs *rtc_common)
Get the minutes in BCD for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:1345
Definition: dl_rtc_common.h:375
uint8_t hours
Definition: dl_rtc_common.h:580
__STATIC_INLINE void DL_RTC_Common_setAlarm1DayOfWeekBCD(RTC_Regs *rtc_common, uint8_t day)
Set the day of the week in BCD for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:1440
__STATIC_INLINE uint8_t DL_RTC_Common_getAlarm2DayOfMonthBCD(const RTC_Regs *rtc_common)
Get the day of the month in BCD for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:1734
__STATIC_INLINE void DL_RTC_Common_setAlarm2DayOfMonthBinary(RTC_Regs *rtc_common, uint8_t day)
Set the day of the month in binary for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:2383
Definition: dl_rtc_common.h:383
Definition: dl_rtc_common.h:359
__STATIC_INLINE bool DL_RTC_Common_isCalibrationWriteResultOK(const RTC_Regs *rtc_common)
Checks if RTC Common new calibration values were written OK.
Definition: dl_rtc_common.h:887
__STATIC_INLINE void DL_RTC_Common_disableAlarm2MinutesBinary(RTC_Regs *rtc_common)
Disable minutes in binary for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:2210
__STATIC_INLINE bool DL_RTC_Common_isSafeToRead(const RTC_Regs *rtc_common)
Checks if RTC Common is safe for reading.
Definition: dl_rtc_common.h:857
__STATIC_INLINE bool DL_RTC_Common_isPowerEnabled(const RTC_Regs *rtc_common)
Returns if the Peripheral Write Enable (PWREN) register for the RTC is enabled.
Definition: dl_rtc_common.h:681
uint8_t dayOfMonth
Definition: dl_rtc_common.h:586
__STATIC_INLINE void DL_RTC_Common_setAlarm1DayOfWeekBinary(RTC_Regs *rtc_common, uint8_t day)
Set the day of the week in binary for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:2115
__STATIC_INLINE uint8_t DL_RTC_Common_getAlarm2DayOfWeekBCD(const RTC_Regs *rtc_common)
Get the day of the week in BCD for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:1679
DL_RTC_COMMON_FORMAT
Definition: dl_rtc_common.h:413
DL_RTC_Common_CalendarAlarm DL_RTC_Common_getCalendarAlarm2(const RTC_Regs *rtc_common)
Get calendar alarm 2.
void DL_RTC_Common_initCalendar(RTC_Regs *rtc_common, DL_RTC_Common_Calendar calendarTime, DL_RTC_COMMON_FORMAT formatSelect)
Initializes the settings to operate the RTC Common in Calendar mode.
__STATIC_INLINE DL_RTC_COMMON_OFFSET_CALIBRATION_FREQUENCY DL_RTC_Common_getOffsetCalibrationFrequency(const RTC_Regs *rtc_common)
Gets the offset calibration frequency.
Definition: dl_rtc_common.h:977
__STATIC_INLINE uint8_t DL_RTC_Common_getCalendarHoursBinary(const RTC_Regs *rtc_common)
Get the hours in binary in the RTC Common calendar.
Definition: dl_rtc_common.h:1835
void DL_RTC_Common_enableCalendarAlarm1(RTC_Regs *rtc_common)
Enable calendar alarm 1.
void DL_RTC_Common_setCalendarAlarm2(RTC_Regs *rtc_common, DL_RTC_Common_CalendarAlarm alarmTime)
Set calendar alarm 2.
__STATIC_INLINE uint16_t DL_RTC_Common_getCalendarYearBinary(const RTC_Regs *rtc_common)
Get the year in binary in the RTC Common calendar.
Definition: dl_rtc_common.h:1970
Definition: dl_rtc_common.h:409
__STATIC_INLINE void DL_RTC_Common_enableAlarm1DayOfMonthBinary(RTC_Regs *rtc_common)
Enable day of the month in binary for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:2143
__STATIC_INLINE uint16_t DL_RTC_Common_getTimeStampYearBinary(const RTC_Regs *rtc_common)
Get the year in binary in the time stamp.
Definition: dl_rtc_common.h:2825
__STATIC_INLINE void DL_RTC_Common_enableAlarm2DayOfMonthBinary(RTC_Regs *rtc_common)
Enable day of the month in binary for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:2358
__STATIC_INLINE void DL_RTC_Common_reset(RTC_Regs *rtc_common)
Resets all registers in the RTC Common module.
Definition: dl_rtc_common.h:693
__STATIC_INLINE uint32_t DL_RTC_Common_getRawInterruptStatus(const RTC_Regs *rtc_common, uint32_t interruptMask)
Check interrupt flag of any RTC Common interrupt.
Definition: dl_rtc_common.h:2916
Definition: dl_rtc_common.h:481
__STATIC_INLINE void DL_RTC_Common_enableClockControl(RTC_Regs *rtc_common)
Enables the supply of the 32kHz clock to the RTC Common. It will not power up the 32kHz crystal oscil...
Definition: dl_rtc_common.h:619
__STATIC_INLINE void DL_RTC_Common_setCalendarSecondsBCD(RTC_Regs *rtc_common, uint8_t seconds)
Set the seconds in BCD in the RTC Common calendar.
Definition: dl_rtc_common.h:1049
__STATIC_INLINE void DL_RTC_Common_disableAlarm2HoursBCD(RTC_Regs *rtc_common)
Disable hours in BCD for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:1593
uint8_t dayOfWeek
Definition: dl_rtc_common.h:583
DL_RTC_COMMON_PRESCALER2_DIVIDE
Definition: dl_rtc_common.h:469
Definition: dl_rtc_common.h:463
__STATIC_INLINE void DL_RTC_Common_enableAlarm2HoursBCD(RTC_Regs *rtc_common)
Enable hours in BCD for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:1582
__STATIC_INLINE void DL_RTC_Common_disableAlarm2HoursBinary(RTC_Regs *rtc_common)
Disable hours in binary for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:2264
Definition: dl_rtc_common.h:399
uint8_t dayOfMonth
Definition: dl_rtc_common.h:562
__STATIC_INLINE void DL_RTC_Common_disableDebugMode(RTC_Regs *rtc_common)
Disables the RTC Common modules debug mode.
Definition: dl_rtc_common.h:757
__STATIC_INLINE uint32_t DL_RTC_Common_getEnabledEvents(const RTC_Regs *rtc_common, uint32_t eventMask)
Check which RTC Common events are enabled.
Definition: dl_rtc_common.h:2991
__STATIC_INLINE void DL_RTC_Common_enableInterrupt(RTC_Regs *rtc_common, uint32_t interruptMask)
Enable RTC Common interrupts.
Definition: dl_rtc_common.h:2840
__STATIC_INLINE void DL_RTC_Common_enableAlarm1DayOfWeekBinary(RTC_Regs *rtc_common)
Enable day of the week in binary for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:2090
uint8_t minutes
Definition: dl_rtc_common.h:553
__STATIC_INLINE void DL_RTC_Common_enableAlarm1MinutesBCD(RTC_Regs *rtc_common)
Enable minutes in BCD for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:1302
__STATIC_INLINE void DL_RTC_Common_disableAlarm1DayOfMonthBinary(RTC_Regs *rtc_common)
Disable day of the month in binary for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:2155
__STATIC_INLINE void DL_RTC_Common_enableAlarm1DayOfMonthBCD(RTC_Regs *rtc_common)
Enable day of the month in BCD for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:1468
__STATIC_INLINE uint8_t DL_RTC_Common_getAlarm1DayOfMonthBCD(const RTC_Regs *rtc_common)
Get the day of the month in BCD for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:1511
__STATIC_INLINE void DL_RTC_Common_disableEvent(RTC_Regs *rtc_common, uint32_t eventMask)
Disable RTC Common event.
Definition: dl_rtc_common.h:2974
DL_RTC_COMMON_INTERVAL_ALARM
Definition: dl_rtc_common.h:421
__STATIC_INLINE uint8_t DL_RTC_Common_getCalendarSecondsBinary(const RTC_Regs *rtc_common)
Get the seconds in binary in the RTC Common calendar.
Definition: dl_rtc_common.h:1769
__STATIC_INLINE void DL_RTC_Common_setCalendarMonthBinary(RTC_Regs *rtc_common, uint8_t month)
Set the month in binary in the RTC Common calendar.
Definition: dl_rtc_common.h:1916
Definition: dl_rtc_common.h:401
__STATIC_INLINE uint8_t DL_RTC_Common_getTimeStampHoursBinary(const RTC_Regs *rtc_common)
Get the hours in binary in the time stamp.
Definition: dl_rtc_common.h:2744
__STATIC_INLINE void DL_RTC_Common_enableDebugInterrupts(RTC_Regs *rtc_common)
Enables interrupts when the CPU is in debug mode. Interrupt requests are signaled to the interrupt co...
Definition: dl_rtc_common.h:722
__STATIC_INLINE uint8_t DL_RTC_Common_getAlarm1HoursBinary(const RTC_Regs *rtc_common)
Get the hours in binary for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:2078
__STATIC_INLINE uint8_t DL_RTC_Common_getTimeStampHoursBCD(const RTC_Regs *rtc_common)
Get the hours in BCD in the time stamp.
Definition: dl_rtc_common.h:2595
__STATIC_INLINE void DL_RTC_Common_enableAlarm2HoursBinary(RTC_Regs *rtc_common)
Enable hours in binary for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:2252
Definition: dl_rtc_common.h:473
__STATIC_INLINE uint8_t DL_RTC_Common_getAlarm1MinutesBinary(const RTC_Regs *rtc_common)
Get the minutes in binary for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:2025
DriverLib Common APIs.
Definition: dl_rtc_common.h:461
Definition: dl_rtc_common.h:491
DL_RTC_COMMON_IIDX
Definition: dl_rtc_common.h:479
__STATIC_INLINE DL_RTC_COMMON_PRESCALER0_DIVIDE DL_RTC_Common_getPrescaler0(const RTC_Regs *rtc_common)
Get prescaler 0 interrupt interval.
Definition: dl_rtc_common.h:2495
__STATIC_INLINE void DL_RTC_Common_setClockFormat(RTC_Regs *rtc_common, DL_RTC_COMMON_FORMAT formatSelect)
Set the format of the real-time clock.
Definition: dl_rtc_common.h:771
__STATIC_INLINE void DL_RTC_Common_setOffsetCalibration(RTC_Regs *rtc_common, DL_RTC_COMMON_OFFSET_CALIBRATION_FREQUENCY offsetFrequency, DL_RTC_COMMON_OFFSET_CALIBRATION_SIGN offsetSign, uint8_t offsetValue)
Sets the offset error calibration.
Definition: dl_rtc_common.h:959
__STATIC_INLINE uint8_t DL_RTC_Common_getCalendarDayOfWeekBinary(const RTC_Regs *rtc_common)
Get the day of the week in binary in the RTC Common calendar.
Definition: dl_rtc_common.h:1868
Definition: dl_rtc_common.h:471
DL_RTC_Common_CalendarAlarm DL_RTC_Common_getCalendarAlarm1(const RTC_Regs *rtc_common)
Get calendar alarm 1.
__STATIC_INLINE void DL_RTC_Common_clearInterruptStatus(RTC_Regs *rtc_common, uint32_t interruptMask)
Clear pending RTC Common interrupts.
Definition: dl_rtc_common.h:2948
__STATIC_INLINE bool DL_RTC_Common_isReadyToCalibrate(const RTC_Regs *rtc_common)
Checks if RTC Common is ready to get new calibration values.
Definition: dl_rtc_common.h:871
Definition: dl_rtc_common.h:425
__STATIC_INLINE void DL_RTC_Common_enableAlarm2DayOfMonthBCD(RTC_Regs *rtc_common)
Enable day of the month in BCD for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:1691
__STATIC_INLINE uint8_t DL_RTC_Common_getAlarm2MinutesBinary(const RTC_Regs *rtc_common)
Get the minutes in binary for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:2240
__STATIC_INLINE void DL_RTC_Common_disableAlarm1DayOfMonthBCD(RTC_Regs *rtc_common)
Disable day of the month in BCD for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:1480
Definition: dl_rtc_common.h:451
Definition: dl_rtc_common.h:367
Definition: dl_rtc_common.h:435
__STATIC_INLINE void DL_RTC_Common_setOffsetCalibrationAdjValue(RTC_Regs *rtc_common, DL_RTC_COMMON_OFFSET_CALIBRATION_SIGN offsetSign, uint8_t offsetValue)
Sets the offset error calibration adjustment value.
Definition: dl_rtc_common.h:928
Calendar struct to use in DL_RTC_Common_initCalendar()
Definition: dl_rtc_common.h:571
Definition: dl_rtc_common.h:415
__STATIC_INLINE void DL_RTC_Common_setCalendarYearBCD(RTC_Regs *rtc_common, uint16_t year)
Set the year in in BCD the RTC Common calendar.
Definition: dl_rtc_common.h:1263
__STATIC_INLINE void DL_RTC_Common_setCalendarDayOfMonthBCD(RTC_Regs *rtc_common, uint8_t day)
Set the day of the month in BCD in the RTC Common calendar.
Definition: dl_rtc_common.h:1190
Definition: dl_rtc_common.h:457
__STATIC_INLINE void DL_RTC_Common_setAlarm2MinutesBCD(RTC_Regs *rtc_common, uint8_t minutes)
Set the minutes in BCD for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:1550
__STATIC_INLINE void DL_RTC_Common_setAlarm1HoursBinary(RTC_Regs *rtc_common, uint8_t hours)
Set the hours in binary for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:2062
Definition: dl_rtc_common.h:465
__STATIC_INLINE uint32_t DL_RTC_Common_getEnabledEventStatus(const RTC_Regs *rtc_common, uint32_t eventMask)
Check event flag of enabled RTC Common event.
Definition: dl_rtc_common.h:3013
__STATIC_INLINE void DL_RTC_Common_setAlarm2HoursBinary(RTC_Regs *rtc_common, uint8_t hours)
Set the hours in binary for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:2277
uint8_t month
Definition: dl_rtc_common.h:589
__STATIC_INLINE void DL_RTC_Common_setAlarm1HoursBCD(RTC_Regs *rtc_common, uint8_t hours)
Set the hours in BCD for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:1382
Alarm struct to use in DL_RTC_Common_setCalendarAlarm.
Definition: dl_rtc_common.h:550
__STATIC_INLINE void DL_RTC_Common_setCalendarHoursBCD(RTC_Regs *rtc_common, uint8_t hours)
Set the hours in in BCD the RTC Common calendar.
Definition: dl_rtc_common.h:1121
__STATIC_INLINE void DL_RTC_Common_enableAlarm2MinutesBCD(RTC_Regs *rtc_common)
Enable minutes in BCD for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:1525
__STATIC_INLINE void DL_RTC_Common_enableAlarm2DayOfWeekBinary(RTC_Regs *rtc_common)
Enable day of the week in binary for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:2305
__STATIC_INLINE void DL_RTC_Common_disableAlarm1DayOfWeekBCD(RTC_Regs *rtc_common)
Disable day of the week in BCD for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:1427
__STATIC_INLINE uint8_t DL_RTC_Common_getAlarm2DayOfMonthBinary(const RTC_Regs *rtc_common)
Get the day of the month in binary for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:2400
__STATIC_INLINE uint16_t DL_RTC_Common_getTimeStampYearBCD(const RTC_Regs *rtc_common)
Get the year in BCD in the time stamp.
Definition: dl_rtc_common.h:2681
uint8_t hours
Definition: dl_rtc_common.h:556
__STATIC_INLINE void DL_RTC_Common_setAlarm1MinutesBinary(RTC_Regs *rtc_common, uint8_t minutes)
Set the minutes in binary for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:2009
Definition: dl_rtc_common.h:357
__STATIC_INLINE uint8_t DL_RTC_Common_getTimeStampDayOfMonthBinary(const RTC_Regs *rtc_common)
Get the day of the month in binary in the time stamp.
Definition: dl_rtc_common.h:2784
__STATIC_INLINE void DL_RTC_Common_enableAlarm1HoursBinary(RTC_Regs *rtc_common)
Enable hours in binary for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:2037
DL_RTC_COMMON_PRESCALER0_DIVIDE
Definition: dl_rtc_common.h:433
DL_RTC_COMMON_STATUS
Definition: dl_rtc_common.h:355
__STATIC_INLINE void DL_RTC_Common_setAlarm2MinutesBinary(RTC_Regs *rtc_common, uint8_t minutes)
Set the minutes in binary for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:2224
__STATIC_INLINE uint32_t DL_RTC_Common_getTemperatureCompensation(const RTC_Regs *rtc_common)
Get the RTC Common temperature compensation.
Definition: dl_rtc_common.h:1036
__STATIC_INLINE void DL_RTC_Common_setAlarm2DayOfMonthBCD(RTC_Regs *rtc_common, uint8_t day)
Set the day of the month in BCD for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:1716
__STATIC_INLINE uint8_t DL_RTC_Common_getCalendarDayOfMonthBinary(const RTC_Regs *rtc_common)
Get the day of the month in binary in the RTC Common calendar.
Definition: dl_rtc_common.h:1902
__STATIC_INLINE void DL_RTC_Common_disableAlarm2DayOfWeekBCD(RTC_Regs *rtc_common)
Disable day of the week in BCD for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:1650
Definition: dl_rtc_common.h:483
void DL_RTC_Common_disableCalendarAlarm1(RTC_Regs *rtc_common)
Disable calendar alarm 1.
Definition: dl_rtc_common.h:487
Definition: dl_rtc_common.h:475
__STATIC_INLINE void DL_RTC_Common_enableAlarm1MinutesBinary(RTC_Regs *rtc_common)
Enable minutes in binary in binary for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:1983
Definition: dl_rtc_common.h:397
__STATIC_INLINE void DL_RTC_Common_disableAlarm2DayOfMonthBCD(RTC_Regs *rtc_common)
Disable day of the month in BCD for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:1703
__STATIC_INLINE uint8_t DL_RTC_Common_getAlarm1DayOfMonthBinary(const RTC_Regs *rtc_common)
Get the day of the month in binary for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:2185
__STATIC_INLINE uint8_t DL_RTC_Common_getTimeStampSecondsBinary(const RTC_Regs *rtc_common)
Get the seconds in binary in the time stamp.
Definition: dl_rtc_common.h:2704
Definition: dl_rtc_common.h:485
__STATIC_INLINE void DL_RTC_Common_disableAlarm2DayOfMonthBinary(RTC_Regs *rtc_common)
Disable day of the month in binary for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:2370
__STATIC_INLINE void DL_RTC_Common_enableEvent(RTC_Regs *rtc_common, uint32_t eventMask)
Enable RTC Common event.
Definition: dl_rtc_common.h:2961
DL_RTC_COMMON_PRESCALER1_DIVIDE
Definition: dl_rtc_common.h:449
__STATIC_INLINE void DL_RTC_Common_disablePower(RTC_Regs *rtc_common)
Disables the Peripheral Write Enable (PWREN) register for the RTC.
Definition: dl_rtc_common.h:659
__STATIC_INLINE DL_RTC_COMMON_INTERVAL_ALARM DL_RTC_Common_getIntervalAlarm(const RTC_Regs *rtc_common)
Gets the interval alarm event condition.
Definition: dl_rtc_common.h:832
__STATIC_INLINE void DL_RTC_Common_setCalendarHoursBinary(RTC_Regs *rtc_common, uint8_t hours)
Set the hours in binary in the RTC Common calendar.
Definition: dl_rtc_common.h:1815
Definition: dl_rtc_common.h:429
Definition: dl_rtc_common.h:443
__STATIC_INLINE DL_RTC_COMMON_OFFSET_CALIBRATION_SIGN DL_RTC_Common_getOffsetCalibrationSign(const RTC_Regs *rtc_common)
Gets the offset calibration sign.
Definition: dl_rtc_common.h:994
__STATIC_INLINE uint8_t DL_RTC_Common_getCalendarMinutesBinary(const RTC_Regs *rtc_common)
Get the minutes in binary in the RTC Common calendar.
Definition: dl_rtc_common.h:1802
__STATIC_INLINE uint8_t DL_RTC_Common_getCalendarMinutesBCD(const RTC_Regs *rtc_common)
Get the minutes in in BCD the RTC Common calendar.
Definition: dl_rtc_common.h:1106
__STATIC_INLINE void DL_RTC_Common_enableAlarm2DayOfWeekBCD(RTC_Regs *rtc_common)
Enable day of the week in BCD for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:1638
DL_RTC_COMMON_COMPENSATION_WRITE_RESULT
Definition: dl_rtc_common.h:371
__STATIC_INLINE void DL_RTC_Common_setCalendarMonthBCD(RTC_Regs *rtc_common, uint8_t month)
Set the month in in BCD the RTC Common calendar.
Definition: dl_rtc_common.h:1227
__STATIC_INLINE void DL_RTC_Common_disableClockControl(RTC_Regs *rtc_common)
Disables the supply of the 32kHz clock to the RTC Common.
Definition: dl_rtc_common.h:629
Definition: dl_rtc_common.h:365
Definition: dl_rtc_common.h:459
Definition: dl_rtc_common.h:455
__STATIC_INLINE void DL_RTC_Common_enableAlarm2MinutesBinary(RTC_Regs *rtc_common)
Enable minutes in binary for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:2198
__STATIC_INLINE void DL_RTC_Common_setAlarm2HoursBCD(RTC_Regs *rtc_common, uint8_t hours)
Set the hours in BCD for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:1605
__STATIC_INLINE uint8_t DL_RTC_Common_getCalendarDayOfMonthBCD(const RTC_Regs *rtc_common)
Get the day of the month in BCD in the RTC Common calendar.
Definition: dl_rtc_common.h:1212
__STATIC_INLINE void DL_RTC_Common_enablePower(RTC_Regs *rtc_common)
Enables the Peripheral Write Enable (PWREN) register for the RTC.
Definition: dl_rtc_common.h:643
__STATIC_INLINE void DL_RTC_Common_setTemperatureCompensation(RTC_Regs *rtc_common, DL_RTC_COMMON_TEMP_CALIBRATION offsetDirection, uint32_t offsetValue)
Set the specified RTC Common temperature compensation.
Definition: dl_rtc_common.h:1017
__STATIC_INLINE void DL_RTC_Common_setCalendarMinutesBinary(RTC_Regs *rtc_common, uint8_t minutes)
Set the minutes in binary in the RTC Common calendar.
Definition: dl_rtc_common.h:1782
__STATIC_INLINE uint8_t DL_RTC_Common_getTimeStampMinutesBCD(const RTC_Regs *rtc_common)
Get the minutes in BCD in the time stamp.
Definition: dl_rtc_common.h:2573
DL_RTC_COMMON_TEMP_CALIBRATION
Definition: dl_rtc_common.h:405
__STATIC_INLINE void DL_RTC_Common_setPeriodicAlarm1(RTC_Regs *rtc_common, DL_RTC_COMMON_PRESCALER1_DIVIDE prescaler1Divider)
Set periodic alarm 1.
Definition: dl_rtc_common.h:2463
__STATIC_INLINE uint8_t DL_RTC_Common_getAlarm2DayOfWeekBinary(const RTC_Regs *rtc_common)
Get the day of the week in binary for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:2346
__STATIC_INLINE void DL_RTC_Common_setCalendarDayOfWeekBinary(RTC_Regs *rtc_common, uint8_t day)
Set the day of the week in binary in the RTC Common calendar.
Definition: dl_rtc_common.h:1848
uint8_t dayOfWeek
Definition: dl_rtc_common.h:559
__STATIC_INLINE uint8_t DL_RTC_Common_getAlarm1DayOfWeekBCD(const RTC_Regs *rtc_common)
Get the day of the week in BCD for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:1456
__STATIC_INLINE uint8_t DL_RTC_Common_getCalendarMonthBinary(const RTC_Regs *rtc_common)
Get the month of the year in binary in the RTC Common calendar.
Definition: dl_rtc_common.h:1936
Definition: dl_rtc_common.h:437
__STATIC_INLINE void DL_RTC_Common_disableInterrupt(RTC_Regs *rtc_common, uint32_t interruptMask)
Disable RTC Common interrupts.
Definition: dl_rtc_common.h:2854
__STATIC_INLINE void DL_RTC_Common_disableAlarm2MinutesBCD(RTC_Regs *rtc_common)
Disable minutes in BCD for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:1536
uint16_t year
Definition: dl_rtc_common.h:592
Definition: dl_rtc_common.h:423
__STATIC_INLINE void DL_RTC_Common_disableAlarm1HoursBinary(RTC_Regs *rtc_common)
Disable hours in binary for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:2049
Definition: dl_rtc_common.h:381
__STATIC_INLINE uint8_t DL_RTC_Common_getAlarm2HoursBCD(const RTC_Regs *rtc_common)
Get the hours in BCD for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:1623
__STATIC_INLINE DL_RTC_COMMON_PRESCALER2_DIVIDE DL_RTC_Common_getPrescaler2(const RTC_Regs *rtc_common)
Get prescaler 2 interrupt interval.
Definition: dl_rtc_common.h:2529
__STATIC_INLINE void DL_RTC_Common_setIntervalAlarm(RTC_Regs *rtc_common, DL_RTC_COMMON_INTERVAL_ALARM alarmEvent)
Sets the interval alarm event condition.
Definition: dl_rtc_common.h:811
__STATIC_INLINE DL_RTC_COMMON_PRESCALER1_DIVIDE DL_RTC_Common_getPrescaler1(const RTC_Regs *rtc_common)
Get prescaler 1 interrupt interval.
Definition: dl_rtc_common.h:2512
__STATIC_INLINE uint8_t DL_RTC_Common_getTimeStampMinutesBinary(const RTC_Regs *rtc_common)
Get the minutes in binary in the time stamp.
Definition: dl_rtc_common.h:2724
__STATIC_INLINE uint8_t DL_RTC_Common_getAlarm2HoursBinary(const RTC_Regs *rtc_common)
Get the hours in binary for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:2293
DL_RTC_Common_Calendar DL_RTC_Common_getCalendarTime(const RTC_Regs *rtc_common)
Returns the Calendar Time.
__STATIC_INLINE void DL_RTC_Common_setPrescalerEvents(RTC_Regs *rtc_common, DL_RTC_COMMON_PRESCALER0_DIVIDE prescaler0Divider, DL_RTC_COMMON_PRESCALER1_DIVIDE prescaler1Divider, DL_RTC_COMMON_PRESCALER2_DIVIDE prescaler2Divider)
Set prescale interrupt interval for timer 0, 1, and 2.
Definition: dl_rtc_common.h:2426
Definition: dl_rtc_common.h:441
Definition: dl_rtc_common.h:427
__STATIC_INLINE void DL_RTC_Common_setCalendarSecondsBinary(RTC_Regs *rtc_common, uint8_t seconds)
Set the seconds in binary the RTC Common calendar.
Definition: dl_rtc_common.h:1749
__STATIC_INLINE void DL_RTC_Common_enableAlarm1HoursBCD(RTC_Regs *rtc_common)
Enable hours in BCD for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:1359
__STATIC_INLINE void DL_RTC_Common_setAlarm2DayOfWeekBCD(RTC_Regs *rtc_common, uint8_t day)
Set the day of the week in BCD for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:1663
__STATIC_INLINE bool DL_RTC_Common_isReset(const RTC_Regs *rtc_common)
Returns if the RTC Common module was reset.
Definition: dl_rtc_common.h:709
__STATIC_INLINE void DL_RTC_Common_enableAlarm1DayOfWeekBCD(RTC_Regs *rtc_common)
Enable day of the week in BCD for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:1415
__STATIC_INLINE void DL_RTC_Common_disableAlarm1MinutesBCD(RTC_Regs *rtc_common)
Disable minutes in BCD for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:1313
__STATIC_INLINE void DL_RTC_Common_setPublisherChanID(RTC_Regs *rtc_common, uint8_t chanID)
Sets the event publisher channel ID.
Definition: dl_rtc_common.h:3060
__STATIC_INLINE void DL_RTC_Common_setAlarm1DayOfMonthBinary(RTC_Regs *rtc_common, uint8_t day)
Set the day of the month in binary for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:2168
__STATIC_INLINE void DL_RTC_Common_disableDebugInterrupts(RTC_Regs *rtc_common)
Disables interrupts when the CPU is in debug mode. Interrupts of the RTC Common module will not be ca...
Definition: dl_rtc_common.h:735
__STATIC_INLINE void DL_RTC_Common_disableAlarm1MinutesBinary(RTC_Regs *rtc_common)
Disable minutes in binary for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:1995
__STATIC_INLINE void DL_RTC_Common_setCalendarDayOfWeekBCD(RTC_Regs *rtc_common, uint8_t day)
Set the day of the week in BCD in the RTC Common calendar.
Definition: dl_rtc_common.h:1157
__STATIC_INLINE bool DL_RTC_Common_isClockSourceLFCLK(const RTC_Regs *rtc_common)
Returns if LFCLK is selected as clock source.
Definition: dl_rtc_common.h:605
void DL_RTC_Common_setCalendarAlarm1(RTC_Regs *rtc_common, DL_RTC_Common_CalendarAlarm alarmTime)
Set calendar alarm 1.
void DL_RTC_Common_disableCalendarAlarm2(RTC_Regs *rtc_common)
Disable calendar alarm 2.
DL_RTC_COMMON_COMPENSATION_STATUS
Definition: dl_rtc_common.h:363
__STATIC_INLINE void DL_RTC_Common_setCalendarMinutesBCD(RTC_Regs *rtc_common, uint8_t minutes)
Set the minutes in in BCD the RTC Common calendar.
Definition: dl_rtc_common.h:1085
uint8_t seconds
Definition: dl_rtc_common.h:574
Definition: dl_rtc_common.h:445
__STATIC_INLINE void DL_RTC_Common_setAlarm2DayOfWeekBinary(RTC_Regs *rtc_common, uint8_t day)
Set the day of the week in binary for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:2330
Definition: dl_rtc_common.h:453
Definition: dl_rtc_common.h:407
__STATIC_INLINE void DL_RTC_Common_setAlarm1MinutesBCD(RTC_Regs *rtc_common, uint8_t minutes)
Set the minutes in BCD for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:1327
__STATIC_INLINE void DL_RTC_Common_disableAlarm1HoursBCD(RTC_Regs *rtc_common)
Disable hours in BCD for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:1370
__STATIC_INLINE void DL_RTC_Common_disableAlarm2DayOfWeekBinary(RTC_Regs *rtc_common)
Disable day of the week in binary for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:2317
__STATIC_INLINE DL_RTC_COMMON_IIDX DL_RTC_Common_getPendingInterrupt(const RTC_Regs *rtc_common)
Get highest priority pending RTC Common interrupt.
Definition: dl_rtc_common.h:2934
__STATIC_INLINE uint8_t DL_RTC_Common_getAlarm2MinutesBCD(const RTC_Regs *rtc_common)
Get the minutes in BCD for RTC Common Calendar Alarm 2.
Definition: dl_rtc_common.h:1568
__STATIC_INLINE DL_RTC_COMMON_FORMAT DL_RTC_Common_getClockFormat(const RTC_Regs *rtc_common)
Get the format currently being used for counting the real-time clock.
Definition: dl_rtc_common.h:787
__STATIC_INLINE void DL_RTC_Common_setPeriodicAlarm2(RTC_Regs *rtc_common, DL_RTC_COMMON_PRESCALER2_DIVIDE prescaler2Divider)
Set periodic alarm 2.
Definition: dl_rtc_common.h:2478
__STATIC_INLINE uint16_t DL_RTC_Common_getCalendarYearBCD(const RTC_Regs *rtc_common)
Get the year in in BCD the RTC Common calendar.
Definition: dl_rtc_common.h:1286
__STATIC_INLINE uint8_t DL_RTC_Common_getTimeStampDayOfWeekBinary(const RTC_Regs *rtc_common)
Get the day of the week in binary in the time stamp.
Definition: dl_rtc_common.h:2764
Definition: dl_rtc_common.h:489
Definition: dl_rtc_common.h:493
__STATIC_INLINE void DL_RTC_Common_clearEventsStatus(RTC_Regs *rtc_common, uint32_t eventMask)
Clear pending RTC Common events.
Definition: dl_rtc_common.h:3046
DL_RTC_COMMON_OFFSET_CALIBRATION_SIGN
Definition: dl_rtc_common.h:379
__STATIC_INLINE uint8_t DL_RTC_Common_getAlarm1HoursBCD(const RTC_Regs *rtc_common)
Get the hours in BCD for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:1400
__STATIC_INLINE uint8_t DL_RTC_Common_getCalendarDayOfWeekBCD(const RTC_Regs *rtc_common)
Get the day of the week in BCD in the RTC Common calendar.
Definition: dl_rtc_common.h:1177
void DL_RTC_Common_enableCalendarAlarm2(RTC_Regs *rtc_common)
Enable calendar alarm 2.
__STATIC_INLINE uint8_t DL_RTC_Common_getCalendarSecondsBCD(const RTC_Regs *rtc_common)
Get the seconds in in BCD the RTC Common calendar.
Definition: dl_rtc_common.h:1070
__STATIC_INLINE void DL_RTC_Common_disableAlarm1DayOfWeekBinary(RTC_Regs *rtc_common)
Disable day of the week in binary for RTC Common Calendar Alarm 1.
Definition: dl_rtc_common.h:2102
__STATIC_INLINE uint8_t DL_RTC_Common_getTimeStampMonthBinary(const RTC_Regs *rtc_common)
Get the month of the year in binary in the time stamp.
Definition: dl_rtc_common.h:2805
__STATIC_INLINE uint8_t DL_RTC_Common_getCalendarMonthBCD(const RTC_Regs *rtc_common)
Get the month of the year in BCD in the RTC Common calendar.
Definition: dl_rtc_common.h:1248
© Copyright 1995-2025, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale