/** ***************************************************************************** * @file cmem7_rtc.h * * @brief CMEM7 RTC header file * * * @version V1.0 * @date 3. September 2013 * * @note * ***************************************************************************** * @attention * * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE * TIME. AS A RESULT, CAPITAL-MICRO SHALL NOT BE HELD LIABLE FOR ANY DIRECT, * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. * *

© COPYRIGHT 2013 Capital-micro

***************************************************************************** */ #ifndef __CMEM7_RTC_H #define __CMEM7_RTC_H #ifdef __cplusplus extern "C" { #endif #include "cmem7.h" #include "cmem7_conf.h" /** @defgroup RTC_Int * @{ */ #define RTC_Int_Second ((uint32_t)0x00000001) #define RTC_Int_Microsecond ((uint32_t)0x00000002) #define RTC_Int_All ((uint32_t)0x00000003) #define IS_RTC_INT(INT) (((INT) != 0) && (((INT) & ~RTC_Int_All) == 0)) /** * @} */ /** * @brief Enable or disable RTC interrupt. * @param[in] Int interrupt mask bits, which can be the combination of @ref RTC_Int * @param[in] Enable The bit indicates if specific interrupts are enable or not * @retval None */ void RTC_EnableInt(uint32_t Int, BOOL Enable); /** * @brief Check specific interrupts are set or not * @param[in] Int interrupt mask bits, which can be the combination of @ref RTC_Int * @retval BOOL The bit indicates if specific interrupts are set or not */ BOOL RTC_GetIntStatus(uint32_t Int); /** * @brief Clear specific interrupts * @param[in] Int interrupt mask bits, which can be the combination of @ref RTC_Int * @retval None */ void RTC_ClearInt(uint32_t Int); /** * @brief Get seconds since power up * @param None * @retval uint32_t Seconds since power up */ uint32_t RTC_GetSecond(void); /** * @brief Get current micro-seconds * @param None * @retval uint32_t Current micro-seconds */ uint16_t RTC_GetMicroSecond(void); #ifdef __cplusplus } #endif #endif /* __CMEM7_RTC_H */