7 #ifndef __MSP430WARE_RTC_B_H__ 8 #define __MSP430WARE_RTC_B_H__ 10 #include "inc/hw_memmap.h" 12 #ifdef __MSP430_HAS_RTC_B__ 25 #include "inc/hw_memmap.h" 81 #define RTC_B_CALIBRATIONFREQ_OFF (RTCCALF_0) 82 #define RTC_B_CALIBRATIONFREQ_512HZ (RTCCALF_1) 83 #define RTC_B_CALIBRATIONFREQ_256HZ (RTCCALF_2) 84 #define RTC_B_CALIBRATIONFREQ_1HZ (RTCCALF_3) 92 #define RTC_B_CALIBRATION_DOWN2PPM (!(RTCCALS)) 93 #define RTC_B_CALIBRATION_UP4PPM (RTCCALS) 101 #define RTC_B_FORMAT_BINARY (!(RTCBCD)) 102 #define RTC_B_FORMAT_BCD (RTCBCD) 111 #define RTC_B_ALARMCONDITION_OFF (0x80) 119 #define RTC_B_CALENDAREVENT_MINUTECHANGE (RTCTEV_0) 120 #define RTC_B_CALENDAREVENT_HOURCHANGE (RTCTEV_1) 121 #define RTC_B_CALENDAREVENT_NOON (RTCTEV_2) 122 #define RTC_B_CALENDAREVENT_MIDNIGHT (RTCTEV_3) 130 #define RTC_B_PSEVENTDIVIDER_2 (RT0IP_0) 131 #define RTC_B_PSEVENTDIVIDER_4 (RT0IP_1) 132 #define RTC_B_PSEVENTDIVIDER_8 (RT0IP_2) 133 #define RTC_B_PSEVENTDIVIDER_16 (RT0IP_3) 134 #define RTC_B_PSEVENTDIVIDER_32 (RT0IP_4) 135 #define RTC_B_PSEVENTDIVIDER_64 (RT0IP_5) 136 #define RTC_B_PSEVENTDIVIDER_128 (RT0IP_6) 137 #define RTC_B_PSEVENTDIVIDER_256 (RT0IP_7) 146 #define RTC_B_PRESCALE_0 (0x0) 147 #define RTC_B_PRESCALE_1 (0x2) 158 #define RTC_B_TIME_EVENT_INTERRUPT RTCTEVIE 159 #define RTC_B_CLOCK_ALARM_INTERRUPT RTCAIE 160 #define RTC_B_CLOCK_READ_READY_INTERRUPT RTCRDYIE 161 #define RTC_B_PRESCALE_TIMER0_INTERRUPT 0x02 162 #define RTC_B_PRESCALE_TIMER1_INTERRUPT 0x01 163 #define RTC_B_OSCILLATOR_FAULT_INTERRUPT RTCOFIE 222 uint16_t frequencySelect);
250 uint8_t offsetDirection,
251 uint8_t offsetValue);
283 uint16_t formatSelect);
342 uint16_t eventSelect);
374 uint8_t prescaleSelect,
375 uint8_t prescaleEventDivider);
395 uint8_t prescaleSelect);
417 uint8_t prescaleSelect,
418 uint8_t prescaleCounterValue);
449 uint8_t interruptMask);
480 uint8_t interruptMask);
525 uint8_t interruptFlagMask);
556 uint8_t interruptFlagMask);
573 uint16_t valueToConvert);
590 uint16_t valueToConvert);
602 #endif // __MSP430WARE_RTC_B_H__ void RTC_B_clearInterrupt(uint16_t baseAddress, uint8_t interruptFlagMask)
Clears selected RTC interrupt flags.
Definition: rtc_b.c:192
uint8_t RTC_B_getPrescaleValue(uint16_t baseAddress, uint8_t prescaleSelect)
Returns the selected prescaler value.
Definition: rtc_b.c:106
uint8_t Hours
Hour of day between 0-23.
Definition: rtc_a.h:63
uint8_t RTC_B_getInterruptStatus(uint16_t baseAddress, uint8_t interruptFlagMask)
Returns the status of the selected interrupts flags.
Definition: rtc_b.c:163
void RTC_B_setPrescaleValue(uint16_t baseAddress, uint8_t prescaleSelect, uint8_t prescaleCounterValue)
Sets the selected prescaler value.
Definition: rtc_b.c:118
Calendar RTC_B_getCalendarTime(uint16_t baseAddress)
Returns the Calendar Time stored in the Calendar registers of the RTC.
Definition: rtc_b.c:63
void RTC_B_setCalibrationFrequency(uint16_t baseAddress, uint16_t frequencySelect)
Allows and Sets the frequency output to RTCCLK pin for calibration measurement.
Definition: rtc_b.c:31
uint16_t Year
Year between 0-4095.
Definition: rtc_a.h:71
void RTC_B_startClock(uint16_t baseAddress)
Starts the RTC.
Definition: rtc_b.c:21
uint8_t DayOfWeek
Day of week between 0-6.
Definition: rtc_a.h:65
void RTC_B_configureCalendarAlarm(uint16_t baseAddress, RTC_B_configureCalendarAlarmParam *param)
Sets and Enables the desired Calendar Alarm settings.
Definition: rtc_b.c:80
void RTC_B_disableInterrupt(uint16_t baseAddress, uint8_t interruptMask)
Disables selected RTC interrupt sources.
Definition: rtc_b.c:146
uint8_t Minutes
Minutes of hour between 0-59.
Definition: rtc_a.h:61
uint8_t Month
Month between 1-12.
Definition: rtc_a.h:69
uint8_t DayOfMonth
Day of month between 1-31.
Definition: rtc_a.h:67
Used in the RTC_A_initCalendar() function as the CalendarTime parameter.
Definition: rtc_a.h:57
void RTC_B_enableInterrupt(uint16_t baseAddress, uint8_t interruptMask)
Enables selected RTC interrupt sources.
Definition: rtc_b.c:129
void RTC_B_setCalendarEvent(uint16_t baseAddress, uint16_t eventSelect)
Sets a single specified Calendar interrupt condition.
Definition: rtc_b.c:90
void RTC_B_definePrescaleEvent(uint16_t baseAddress, uint8_t prescaleSelect, uint8_t prescaleEventDivider)
Sets up an interrupt condition for the selected Prescaler.
Definition: rtc_b.c:97
void RTC_B_initCalendar(uint16_t baseAddress, Calendar *CalendarTime, uint16_t formatSelect)
Initializes the settings to operate the RTC in calendar mode.
Definition: rtc_b.c:45
uint16_t RTC_B_convertBCDToBinary(uint16_t baseAddress, uint16_t valueToConvert)
Convert the given BCD value to binary format.
Definition: rtc_b.c:216
void RTC_B_holdClock(uint16_t baseAddress)
Holds the RTC.
Definition: rtc_b.c:26
uint8_t Seconds
Seconds of minute between 0-59.
Definition: rtc_a.h:59
uint16_t RTC_B_convertBinaryToBCD(uint16_t baseAddress, uint16_t valueToConvert)
Convert the given binary value to BCD format.
Definition: rtc_b.c:223
void RTC_B_setCalibrationData(uint16_t baseAddress, uint8_t offsetDirection, uint8_t offsetValue)
Sets the specified calibration for the RTC.
Definition: rtc_b.c:38