pRTC->CTRL &= ~stsMask; // corrected from original post |
/** * @briefClears latched RTC statuses * @parampRTC: The base address of RTC block * @paramstsMask: OR'ed status bits to clear * @returnNothing * @noteUse and OR'ed stsMask value of RTC_CTRL_OFD, RTC_CTRL_ALARM1HZ, *and RTC_CTRL_WAKE1KHZ to clear specific RTC states. */ STATIC INLINE uint32_t Chip_RTC_ClearStatus(LPC_RTC_T *pRTC, uint32_t stsMask) { return pRTC->CTRL; } /** * @briefReturn RTC control/status register * @parampRTC: The base address of RTC block * @returnThe current RTC control/status register * @noteMask the return value with a RTC_CTRL_* definitions to determine *which bits are set. For example, mask the return value with *RTC_CTRL_ALARM1HZ to determine if the alarm interrupt is pending. */ STATIC INLINE uint32_t Chip_RTC_GetStatus(LPC_RTC_T *pRTC) { return pRTC->CTRL; } |