56 #include <ti/devices/msp432p4xx/inc/msp.h>
80 #define RTC_C_CALIBRATIONFREQ_OFF (RTC_C_CTL13_CALF_0)
81 #define RTC_C_CALIBRATIONFREQ_512HZ (RTC_C_CTL13_CALF_1)
82 #define RTC_C_CALIBRATIONFREQ_256HZ (RTC_C_CTL13_CALF_2)
83 #define RTC_C_CALIBRATIONFREQ_1HZ (RTC_C_CTL13_CALF_3)
90 #define RTC_C_CALIBRATION_DOWN1PPM ( !(RTC_C_OCAL_OCALS) )
91 #define RTC_C_CALIBRATION_UP1PPM (RTC_C_OCAL_OCALS)
99 #define RTC_C_COMPENSATION_DOWN1PPM ( !(RTC_C_TCMP_TCMPS) )
100 #define RTC_C_COMPENSATION_UP1PPM (RTC_C_TCMP_TCMPS)
107 #define RTC_C_FORMAT_BINARY ( !(RTC_C_CTL13_BCD) )
108 #define RTC_C_FORMAT_BCD (RTC_C_CTL13_BCD)
115 #define RTC_C_ALARMCONDITION_OFF (0x80)
123 #define RTC_C_CALENDAREVENT_MINUTECHANGE (RTC_C_CTL13_TEV_0)
124 #define RTC_C_CALENDAREVENT_HOURCHANGE (RTC_C_CTL13_TEV_1)
125 #define RTC_C_CALENDAREVENT_NOON (RTC_C_CTL13_TEV_2)
126 #define RTC_C_CALENDAREVENT_MIDNIGHT (RTC_C_CTL13_TEV_3)
133 #define RTC_C_PRESCALE_0 (0x0)
134 #define RTC_C_PRESCALE_1 (0x1)
142 #define RTC_C_PSEVENTDIVIDER_2 (RTC_C_PS0CTL_RT0IP_0)
143 #define RTC_C_PSEVENTDIVIDER_4 (RTC_C_PS0CTL_RT0IP_1)
144 #define RTC_C_PSEVENTDIVIDER_8 (RTC_C_PS0CTL_RT0IP_2)
145 #define RTC_C_PSEVENTDIVIDER_16 (RTC_C_PS0CTL_RT0IP_3)
146 #define RTC_C_PSEVENTDIVIDER_32 (RTC_C_PS0CTL_RT0IP_4)
147 #define RTC_C_PSEVENTDIVIDER_64 (RTC_C_PS0CTL_RT0IP_5)
148 #define RTC_C_PSEVENTDIVIDER_128 (RTC_C_PS0CTL_RT0IP_6)
149 #define RTC_C_PSEVENTDIVIDER_256 (RTC_C_PS0CTL_RT0IP_7)
156 #define RTC_C_OSCILLATOR_FAULT_INTERRUPT RTC_C_CTL0_OFIE
157 #define RTC_C_TIME_EVENT_INTERRUPT RTC_C_CTL0_TEVIE
158 #define RTC_C_CLOCK_ALARM_INTERRUPT RTC_C_CTL0_AIE
159 #define RTC_C_CLOCK_READ_READY_INTERRUPT RTC_C_CTL0_RDYIE
160 #define RTC_C_PRESCALE_TIMER0_INTERRUPT 0x02
161 #define RTC_C_PRESCALE_TIMER1_INTERRUPT 0x01
229 uint_fast8_t offsetValue);
252 uint_fast8_t offsetValue);
281 uint_fast16_t formatSelect);
328 uint_fast8_t hoursAlarm, uint_fast8_t dayOfWeekAlarm,
329 uint_fast8_t dayOfmonthAlarm);
379 uint_fast8_t prescaleEventDivider);
418 uint_fast8_t prescaleCounterValue);
619 #define RTC_C_startClockMultipleInstance(a) RTC_C_startClock()
620 #define RTC_C_holdClockMultipleInstance(a) RTC_C_holdClock()
621 #define RTC_C_setCalibrationFrequencyMultipleInstance(a,b) RTC_C_setCalibrationFrequency(b)
622 #define RTC_C_setCalibrationDataMultipleInstance(a,b,c) RTC_C_setCalibrationData(b,c)
623 #define RTC_C_setTemperatureCompensationMultipleInstance(a,b,c) RTC_C_setTemperatureCompensation(b,c)
624 #define RTC_C_initCalendarMultipleInstance(a,b,c) RTC_C_initCalendar(b,c)
625 #define RTC_C_getCalendarTimeMultipleInstance(a) RTC_C_getCalendarTime()
626 #define RTC_C_setCalendarAlarmMultipleInstance(a,b,c,d,e) RTC_C_setCalendarAlarm(b,c,d,e)
627 #define RTC_C_setCalendarEventMultipleInstance(a,b) RTC_C_setCalendarEvent(b)
628 #define RTC_C_definePrescaleEventMultipleInstance(a,b,c) RTC_C_definePrescaleEvent(b,c)
629 #define RTC_C_getPrescaleValueMultipleInstance(a,b) RTC_C_getPrescaleValue(b)
630 #define RTC_C_setPrescaleValueMultipleInstance(a,b,c) RTC_C_setPrescaleValue(b,c)
631 #define RTC_C_convertBCDToBinaryMultipleInstance(a,b) RTC_C_convertBCDToBinary(b)
632 #define RTC_C_convertBinaryToBCDMultipleInstance(a,b) RTC_C_convertBinaryToBCD(b)
633 #define RTC_C_enableInterruptMultipleInstance(a,b) RTC_C_enableInterrupt(b)
634 #define RTC_C_disableInterruptMultipleInstance(a,b) RTC_C_disableInterrupt(b)
635 #define RTC_C_getInterruptStatusMultipleInstance(a) RTC_C_getInterruptStatus()
636 #define RTC_C_getEnabledInterruptStatusMultipleInstance(a) RTC_C_getEnabledInterruptStatus()
637 #define RTC_C_clearInterruptFlagMultipleInstance(a,b) RTC_C_clearInterruptFlag(b)
638 #define RTC_C_registerInterruptMultipleInstance(a,b) RTC_C_registerInterrupt(b)
639 #define RTC_C_unregisterInterruptMultipleInstance(a) RTC_C_unregisterInterrupt()
void RTC_C_startClock(void)
Definition: rtc_c.c:37
void RTC_C_definePrescaleEvent(uint_fast8_t prescaleSelect, uint_fast8_t prescaleEventDivider)
Definition: rtc_c.c:146
uint_fast8_t RTC_C_getEnabledInterruptStatus(void)
Definition: rtc_c.c:285
void RTC_C_setCalibrationData(uint_fast8_t offsetDirection, uint_fast8_t offsetValue)
Definition: rtc_c.c:58
void RTC_C_setPrescaleValue(uint_fast8_t prescaleSelect, uint_fast8_t prescaleCounterValue)
Definition: rtc_c.c:175
uint_fast8_t hours
Definition: rtc_c.h:68
uint_fast16_t year
Definition: rtc_c.h:72
uint_fast8_t minutes
Definition: rtc_c.h:67
void RTC_C_holdClock(void)
Definition: rtc_c.c:44
void RTC_C_setCalendarEvent(uint_fast16_t eventSelect)
Definition: rtc_c.c:139
uint_fast8_t dayOfmonth
Definition: rtc_c.h:70
void RTC_C_registerInterrupt(void(*intHandler)(void))
Definition: rtc_c.c:346
uint_fast8_t RTC_C_getInterruptStatus(void)
Definition: rtc_c.c:254
RTC_C_Calendar RTC_C_getCalendarTime(void)
Definition: rtc_c.c:104
void RTC_C_clearInterruptFlag(uint_fast8_t interruptFlagMask)
Definition: rtc_c.c:323
void RTC_C_disableInterrupt(uint8_t interruptMask)
Definition: rtc_c.c:229
void RTC_C_unregisterInterrupt(void)
Definition: rtc_c.c:352
bool RTC_C_setTemperatureCompensation(uint_fast16_t offsetDirection, uint_fast8_t offsetValue)
Definition: rtc_c.c:66
void RTC_C_initCalendar(const RTC_C_Calendar *calendarTime, uint_fast16_t formatSelect)
Definition: rtc_c.c:80
struct _RTC_C_Calendar RTC_C_Calendar
uint16_t RTC_C_convertBinaryToBCD(uint16_t valueToConvert)
Definition: rtc_c.c:198
void RTC_C_setCalendarAlarm(uint_fast8_t minutesAlarm, uint_fast8_t hoursAlarm, uint_fast8_t dayOfWeekAlarm, uint_fast8_t dayOfmonthAlarm)
Definition: rtc_c.c:130
uint_fast8_t month
Definition: rtc_c.h:71
void RTC_C_enableInterrupt(uint8_t interruptMask)
Definition: rtc_c.c:204
uint_fast8_t RTC_C_getPrescaleValue(uint_fast8_t prescaleSelect)
Definition: rtc_c.c:161
uint_fast8_t dayOfWeek
Definition: rtc_c.h:69
uint_fast8_t seconds
Definition: rtc_c.h:66
uint16_t RTC_C_convertBCDToBinary(uint16_t valueToConvert)
Definition: rtc_c.c:192
void RTC_C_setCalibrationFrequency(uint_fast16_t frequencySelect)
Definition: rtc_c.c:51