Use AzureRTOS ThreadX
This commit is contained in:
@ -78,10 +78,10 @@ typedef struct
|
||||
|
||||
uint32_t OutPutType; /*!< Specifies the RTC Output Pin mode.
|
||||
This parameter can be a value of @ref RTC_Output_Type_ALARM_OUT */
|
||||
#if defined(RTC_CR_TAMPALRM_PU)
|
||||
#if defined(TAMP)
|
||||
uint32_t OutPutPullUp; /*!< Specifies the RTC Output Pull-Up mode.
|
||||
This parameter can be a value of @ref RTC_Output_PullUp_ALARM_OUT */
|
||||
#endif /* RTC_CR_TAMPALRM_PU */
|
||||
#endif /* TAMP */
|
||||
} RTC_InitTypeDef;
|
||||
|
||||
/**
|
||||
@ -195,33 +195,21 @@ typedef struct
|
||||
|
||||
void (* Tamper3EventCallback)(struct __RTC_HandleTypeDef *hrtc); /*!< RTC Tamper 3 Event callback */
|
||||
|
||||
#if defined(TAMP_CR1_ITAMP1E)
|
||||
#if defined(TAMP)
|
||||
void (* InternalTamper1EventCallback)(struct __RTC_HandleTypeDef *hrtc); /*!< RTC Internal Tamper 1 Event callback */
|
||||
#endif /* TAMP_CR1_ITAMP1E */
|
||||
|
||||
#if defined(TAMP_CR1_ITAMP2E)
|
||||
void (* InternalTamper2EventCallback)(struct __RTC_HandleTypeDef *hrtc); /*!< RTC Internal Tamper 2 Event callback */
|
||||
#endif /* TAMP_CR1_ITAMP2E */
|
||||
|
||||
#if defined(TAMP_CR1_ITAMP3E)
|
||||
void (* InternalTamper3EventCallback)(struct __RTC_HandleTypeDef *hrtc); /*!< RTC Internal Tamper 3 Event callback */
|
||||
#endif /* TAMP_CR1_ITAMP3E */
|
||||
|
||||
#if defined(TAMP_CR1_ITAMP4E)
|
||||
void (* InternalTamper4EventCallback)(struct __RTC_HandleTypeDef *hrtc); /*!< RTC Internal Tamper 4 Event callback */
|
||||
#endif /* TAMP_CR1_ITAMP4E */
|
||||
|
||||
#if defined(TAMP_CR1_ITAMP5E)
|
||||
void (* InternalTamper5EventCallback)(struct __RTC_HandleTypeDef *hrtc); /*!< RTC Internal Tamper 5 Event callback */
|
||||
#endif /* TAMP_CR1_ITAMP5E */
|
||||
|
||||
#if defined(TAMP_CR1_ITAMP6E)
|
||||
void (* InternalTamper6EventCallback)(struct __RTC_HandleTypeDef *hrtc); /*!< RTC Internal Tamper 6 Event callback */
|
||||
#endif /* TAMP_CR1_ITAMP6E */
|
||||
|
||||
#if defined(TAMP_CR1_ITAMP8E)
|
||||
void (* InternalTamper8EventCallback)(struct __RTC_HandleTypeDef *hrtc); /*!< RTC Internal Tamper 8 Event callback */
|
||||
#endif /* TAMP_CR1_ITAMP8E */
|
||||
#endif /* TAMP */
|
||||
|
||||
void (* MspInitCallback)(struct __RTC_HandleTypeDef *hrtc); /*!< RTC Msp Init callback */
|
||||
|
||||
@ -244,28 +232,15 @@ typedef enum
|
||||
HAL_RTC_TAMPER1_EVENT_CB_ID = 4u, /*!< RTC Tamper 1 Callback ID */
|
||||
HAL_RTC_TAMPER2_EVENT_CB_ID = 5u, /*!< RTC Tamper 2 Callback ID */
|
||||
HAL_RTC_TAMPER3_EVENT_CB_ID = 6u, /*!< RTC Tamper 3 Callback ID */
|
||||
|
||||
#if defined(TAMP_CR1_ITAMP1E)
|
||||
#if defined(TAMP)
|
||||
HAL_RTC_INTERNAL_TAMPER1_EVENT_CB_ID = 12u, /*!< RTC Internal Tamper 1 Callback ID */
|
||||
#endif /* TAMP_CR1_ITAMP1E */
|
||||
#if defined(TAMP_CR1_ITAMP2E)
|
||||
HAL_RTC_INTERNAL_TAMPER2_EVENT_CB_ID = 13u, /*!< RTC Internal Tamper 2 Callback ID */
|
||||
#endif /* TAMP_CR1_ITAMP2E */
|
||||
#if defined(TAMP_CR1_ITAMP3E)
|
||||
HAL_RTC_INTERNAL_TAMPER3_EVENT_CB_ID = 14u, /*!< RTC Internal Tamper 3 Callback ID */
|
||||
#endif /* TAMP_CR1_ITAMP3E */
|
||||
#if defined(TAMP_CR1_ITAMP4E)
|
||||
HAL_RTC_INTERNAL_TAMPER4_EVENT_CB_ID = 15u, /*!< RTC Internal Tamper 4 Callback ID */
|
||||
#endif /* TAMP_CR1_ITAMP4E */
|
||||
#if defined(TAMP_CR1_ITAMP5E)
|
||||
HAL_RTC_INTERNAL_TAMPER5_EVENT_CB_ID = 16u, /*!< RTC Internal Tamper 5 Callback ID */
|
||||
#endif /* TAMP_CR1_ITAMP5E */
|
||||
#if defined(TAMP_CR1_ITAMP6E)
|
||||
HAL_RTC_INTERNAL_TAMPER6_EVENT_CB_ID = 17u, /*!< RTC Internal Tamper 6 Callback ID */
|
||||
#endif /* TAMP_CR1_ITAMP6E */
|
||||
#if defined(TAMP_CR1_ITAMP8E)
|
||||
HAL_RTC_INTERNAL_TAMPER8_EVENT_CB_ID = 19u, /*!< RTC Internal Tamper 8 Callback ID */
|
||||
#endif /* TAMP_CR1_ITAMP8E */
|
||||
#endif /* TAMP */
|
||||
HAL_RTC_MSPINIT_CB_ID = 20u, /*!< RTC Msp Init callback ID */
|
||||
HAL_RTC_MSPDEINIT_CB_ID = 21u /*!< RTC Msp DeInit callback ID */
|
||||
} HAL_RTC_CallbackIDTypeDef;
|
||||
@ -301,9 +276,9 @@ typedef void (*pRTC_CallbackTypeDef)(RTC_HandleTypeDef *hrtc); /*!< pointer to
|
||||
#define RTC_OUTPUT_ALARMA RTC_CR_OSEL_0
|
||||
#define RTC_OUTPUT_ALARMB RTC_CR_OSEL_1
|
||||
#define RTC_OUTPUT_WAKEUP RTC_CR_OSEL
|
||||
#if defined(RTC_CR_TAMPOE)
|
||||
#if defined(TAMP)
|
||||
#define RTC_OUTPUT_TAMPER RTC_CR_TAMPOE
|
||||
#endif /* RTC_CR_TAMPOE */
|
||||
#endif /* TAMP */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@ -320,17 +295,15 @@ typedef void (*pRTC_CallbackTypeDef)(RTC_HandleTypeDef *hrtc); /*!< pointer to
|
||||
/** @defgroup RTC_Output_Type_ALARM_OUT RTC Output Type ALARM OUT
|
||||
* @{
|
||||
*/
|
||||
#if defined(RTC_CR_TAMPALRM_TYPE)
|
||||
#if defined(TAMP)
|
||||
#define RTC_OUTPUT_TYPE_PUSHPULL 0x00000000u
|
||||
#define RTC_OUTPUT_TYPE_OPENDRAIN RTC_CR_TAMPALRM_TYPE
|
||||
#define RTC_ALARM_OUTPUT_TYPE RTC_CR_TAMPALRM_TYPE
|
||||
#endif /* RTC_CR_TAMPALRM_TYPE */
|
||||
|
||||
#if defined(RTC_OR_ALARMOUTTYPE)
|
||||
#else
|
||||
#define RTC_OUTPUT_TYPE_PUSHPULL RTC_OR_ALARMOUTTYPE
|
||||
#define RTC_OUTPUT_TYPE_OPENDRAIN 0x00000000u
|
||||
#define RTC_ALARM_OUTPUT_TYPE RTC_OR_ALARMOUTTYPE
|
||||
#endif /* RTC_OR_ALARMOUTTYPE */
|
||||
#endif /* TAMP */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@ -338,10 +311,10 @@ typedef void (*pRTC_CallbackTypeDef)(RTC_HandleTypeDef *hrtc); /*!< pointer to
|
||||
/** @defgroup RTC_Output_PullUp_ALARM_OUT RTC Output Pull-Up ALARM OUT
|
||||
* @{
|
||||
*/
|
||||
#if defined(RTC_CR_TAMPALRM_PU)
|
||||
#if defined(TAMP)
|
||||
#define RTC_OUTPUT_PULLUP_NONE 0x00000000u
|
||||
#define RTC_OUTPUT_PULLUP_ON RTC_CR_TAMPALRM_PU
|
||||
#endif /* RTC_CR_TAMPALRM_PU */
|
||||
#endif /* TAMP */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@ -349,15 +322,13 @@ typedef void (*pRTC_CallbackTypeDef)(RTC_HandleTypeDef *hrtc); /*!< pointer to
|
||||
/** @defgroup RTC_Output_ALARM_OUT_Remap RTC Output ALARM OUT Remap
|
||||
* @{
|
||||
*/
|
||||
#if defined(RTC_CR_OUT2EN)
|
||||
#if defined(TAMP)
|
||||
#define RTC_OUTPUT_REMAP_NONE 0x00000000u
|
||||
#define RTC_OUTPUT_REMAP_POS1 RTC_CR_OUT2EN
|
||||
#endif /* RTC_CR_OUT2EN */
|
||||
|
||||
#if defined(RTC_OR_OUT_RMP)
|
||||
#else
|
||||
#define RTC_OUTPUT_REMAP_NONE 0x00000000u
|
||||
#define RTC_OUTPUT_REMAP_POS1 RTC_OR_OUT_RMP
|
||||
#endif /* RTC_OR_OUT_RMP */
|
||||
#endif /* TAMP */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@ -523,48 +494,37 @@ typedef void (*pRTC_CallbackTypeDef)(RTC_HandleTypeDef *hrtc); /*!< pointer to
|
||||
/** @defgroup RTC_Flags_Definitions RTC Flags Definitions
|
||||
* @{
|
||||
*/
|
||||
#if defined(RTC_ICSR_RECALPF)
|
||||
#if defined(TAMP)
|
||||
#define RTC_FLAG_RECALPF RTC_ICSR_RECALPF /*!< Recalibration pending Flag */
|
||||
#endif /* RTC_ICSR_RECALPF */
|
||||
#if defined(RTC_ICSR_INITF)
|
||||
#define RTC_FLAG_INITF RTC_ICSR_INITF /*!< Initialization pending flag */
|
||||
#endif /* RTC_ICSR_INITF */
|
||||
#if defined(RTC_ICSR_RSF)
|
||||
#define RTC_FLAG_RSF RTC_ICSR_RSF /*!< Registers synchronization flag */
|
||||
#endif /* RTC_ICSR_RSF */
|
||||
#if defined(RTC_ICSR_INITS)
|
||||
#define RTC_FLAG_INITS RTC_ICSR_INITS /*!< Initialization status flag */
|
||||
#endif /* RTC_ICSR_INITS */
|
||||
#if defined(RTC_ICSR_SHPF)
|
||||
#define RTC_FLAG_SHPF RTC_ICSR_SHPF /*!< Shift operation pending flag */
|
||||
#endif /* RTC_ICSR_SHPF */
|
||||
#if defined(RTC_ICSR_WUTWF)
|
||||
#define RTC_FLAG_WUTWF RTC_ICSR_WUTWF /*!< Wakeup timer write operation pending flag */
|
||||
#endif /* RTC_ICSR_WUTWF */
|
||||
#if defined(RTC_ICSR_ALRBWF)
|
||||
#define RTC_FLAG_ALRBWF RTC_ICSR_ALRBWF /*!< Alarm B write operation pending flag */
|
||||
#endif /* RTC_ICSR_ALRBWF */
|
||||
#if defined(RTC_ICSR_ALRAWF)
|
||||
#define RTC_FLAG_ALRAWF RTC_ICSR_ALRAWF /*!< Alarm A write operation pending flag */
|
||||
#endif /* RTC_ICSR_ALRAWF */
|
||||
#if defined(RTC_SR_ITSF)
|
||||
#define RTC_FLAG_ITSF RTC_SR_ITSF /*!< Internal Time-stamp flag */
|
||||
#endif /* RTC_SR_ITSF */
|
||||
#if defined(RTC_SR_TSOVF)
|
||||
#define RTC_FLAG_TSOVF RTC_SR_TSOVF /*!< Time-stamp overflow flag */
|
||||
#endif /* RTC_SR_TSOVF */
|
||||
#if defined(RTC_SR_TSF)
|
||||
#define RTC_FLAG_TSF RTC_SR_TSF /*!< Time-stamp flag */
|
||||
#endif /* RTC_SR_TSF */
|
||||
#if defined(RTC_SR_WUTF)
|
||||
#define RTC_FLAG_WUTF RTC_SR_WUTF /*!< Wakeup timer flag */
|
||||
#endif /* RTC_SR_WUTF */
|
||||
#if defined(RTC_SR_ALRBF)
|
||||
#define RTC_FLAG_ALRBF RTC_SR_ALRBF /*!< Alarm B flag */
|
||||
#endif /* RTC_SR_ALRBF */
|
||||
#if defined(RTC_SR_ALRAF)
|
||||
#define RTC_FLAG_ALRAF RTC_SR_ALRAF /*!< Alarm A flag */
|
||||
#endif /* RTC_SR_ALRAF */
|
||||
#else
|
||||
#define RTC_FLAG_RECALPF RTC_ISR_RECALPF
|
||||
#define RTC_FLAG_TSOVF RTC_ISR_TSOVF
|
||||
#define RTC_FLAG_TSF RTC_ISR_TSF
|
||||
#define RTC_FLAG_ITSF RTC_ISR_ITSF
|
||||
#define RTC_FLAG_WUTF RTC_ISR_WUTF
|
||||
#define RTC_FLAG_ALRBF RTC_ISR_ALRBF
|
||||
#define RTC_FLAG_ALRAF RTC_ISR_ALRAF
|
||||
#define RTC_FLAG_INITF RTC_ISR_INITF
|
||||
#define RTC_FLAG_RSF RTC_ISR_RSF
|
||||
#define RTC_FLAG_INITS RTC_ISR_INITS
|
||||
#define RTC_FLAG_SHPF RTC_ISR_SHPF
|
||||
#define RTC_FLAG_WUTWF RTC_ISR_WUTWF
|
||||
#define RTC_FLAG_ALRBWF RTC_ISR_ALRBWF
|
||||
#define RTC_FLAG_ALRAWF RTC_ISR_ALRAWF
|
||||
#endif /* TAMP */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@ -572,73 +532,15 @@ typedef void (*pRTC_CallbackTypeDef)(RTC_HandleTypeDef *hrtc); /*!< pointer to
|
||||
/** @defgroup RTC_Clear_Flags_Definitions RTC Clear Flags Definitions
|
||||
* @{
|
||||
*/
|
||||
#if defined(RTC_SCR_CITSF)
|
||||
#if defined(TAMP)
|
||||
#define RTC_CLEAR_ITSF RTC_SCR_CITSF /*!< Clear Internal Time-stamp flag */
|
||||
#endif /* RTC_SCR_CITSF */
|
||||
#if defined(RTC_SCR_CTSOVF)
|
||||
#define RTC_CLEAR_TSOVF RTC_SCR_CTSOVF /*!< Clear Time-stamp overflow flag */
|
||||
#endif /* RTC_SCR_CTSOVF */
|
||||
#if defined(RTC_SCR_CTSF)
|
||||
#define RTC_CLEAR_TSF RTC_SCR_CTSF /*!< Clear Time-stamp flag */
|
||||
#endif /* RTC_SCR_CTSF */
|
||||
#if defined(RTC_SCR_CWUTF)
|
||||
#define RTC_CLEAR_WUTF RTC_SCR_CWUTF /*!< Clear Wakeup timer flag */
|
||||
#endif /* RTC_SCR_CWUTF */
|
||||
#if defined(RTC_SCR_CALRBF)
|
||||
#define RTC_CLEAR_ALRBF RTC_SCR_CALRBF /*!< Clear Alarm B flag */
|
||||
#endif /* RTC_SCR_CALRBF */
|
||||
#if defined(RTC_SCR_CALRAF)
|
||||
#define RTC_CLEAR_ALRAF RTC_SCR_CALRAF /*!< Clear Alarm A flag */
|
||||
#endif /* RTC_SCR_CALRAF */
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup RTC_Flags_Definitions RTC Flags Definitions
|
||||
* @{
|
||||
*/
|
||||
#if defined(RTC_ISR_RECALPF)
|
||||
#define RTC_FLAG_RECALPF RTC_ISR_RECALPF
|
||||
#endif /* RTC_ISR_RECALPF */
|
||||
#if defined(RTC_ISR_TSOVF)
|
||||
#define RTC_FLAG_TSOVF RTC_ISR_TSOVF
|
||||
#endif /* RTC_ISR_TSOVF */
|
||||
#if defined(RTC_ISR_TSF)
|
||||
#define RTC_FLAG_TSF RTC_ISR_TSF
|
||||
#endif /* RTC_ISR_TSF */
|
||||
#if defined(RTC_ISR_ITSF)
|
||||
#define RTC_FLAG_ITSF RTC_ISR_ITSF
|
||||
#endif /* RTC_ISR_ITSF */
|
||||
#if defined(RTC_ISR_WUTF)
|
||||
#define RTC_FLAG_WUTF RTC_ISR_WUTF
|
||||
#endif /* RTC_ISR_WUTF */
|
||||
#if defined(RTC_ISR_ALRBF)
|
||||
#define RTC_FLAG_ALRBF RTC_ISR_ALRBF
|
||||
#endif /* RTC_ISR_ALRBF */
|
||||
#if defined(RTC_ISR_ALRAF)
|
||||
#define RTC_FLAG_ALRAF RTC_ISR_ALRAF
|
||||
#endif /* RTC_ISR_ALRAF */
|
||||
#if defined(RTC_ISR_INITF)
|
||||
#define RTC_FLAG_INITF RTC_ISR_INITF
|
||||
#endif /* RTC_ISR_INITF */
|
||||
#if defined(RTC_ISR_RSF)
|
||||
#define RTC_FLAG_RSF RTC_ISR_RSF
|
||||
#endif /* RTC_ISR_RSF */
|
||||
#if defined(RTC_ISR_INITS)
|
||||
#define RTC_FLAG_INITS RTC_ISR_INITS
|
||||
#endif /* RTC_ISR_INITS */
|
||||
#if defined(RTC_ISR_SHPF)
|
||||
#define RTC_FLAG_SHPF RTC_ISR_SHPF
|
||||
#endif /* RTC_ISR_SHPF */
|
||||
#if defined(RTC_ISR_WUTWF)
|
||||
#define RTC_FLAG_WUTWF RTC_ISR_WUTWF
|
||||
#endif /* RTC_ISR_WUTWF */
|
||||
#if defined(RTC_ISR_ALRBWF)
|
||||
#define RTC_FLAG_ALRBWF RTC_ISR_ALRBWF
|
||||
#endif /* RTC_ISR_ALRBWF */
|
||||
#if defined(RTC_ISR_ALRAWF)
|
||||
#define RTC_FLAG_ALRAWF RTC_ISR_ALRAWF
|
||||
#endif /* RTC_ISR_ALRAWF */
|
||||
#endif /* TAMP
|
||||
*/
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
@ -687,6 +589,17 @@ typedef void (*pRTC_CallbackTypeDef)(RTC_HandleTypeDef *hrtc); /*!< pointer to
|
||||
(__HANDLE__)->Instance->WPR = 0xFFU; \
|
||||
} while(0u)
|
||||
|
||||
/**
|
||||
* @brief Check whether the RTC Calendar is initialized.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
* @retval None
|
||||
*/
|
||||
#if defined(TAMP)
|
||||
#define __HAL_RTC_IS_CALENDAR_INITIALIZED(__HANDLE__) (((((__HANDLE__)->Instance->ICSR) & (RTC_FLAG_INITS)) == RTC_FLAG_INITS) ? 1U : 0U)
|
||||
#else
|
||||
#define __HAL_RTC_IS_CALENDAR_INITIALIZED(__HANDLE__) (((((__HANDLE__)->Instance->ISR) & (RTC_FLAG_INITS)) == RTC_FLAG_INITS) ? 1U : 0U)
|
||||
#endif /* TAMP */
|
||||
|
||||
/**
|
||||
* @brief Add 1 hour (summer time change).
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
@ -780,12 +693,11 @@ typedef void (*pRTC_CallbackTypeDef)(RTC_HandleTypeDef *hrtc); /*!< pointer to
|
||||
* @arg @ref RTC_IT_ALRB Alarm B interrupt
|
||||
* @retval None
|
||||
*/
|
||||
#if defined(RTC_MISR_ALRAMF)
|
||||
#if defined(TAMP)
|
||||
#define __HAL_RTC_ALARM_GET_IT(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->MISR)& (__INTERRUPT__ >> 12)) != 0U)? 1U : 0U)
|
||||
#endif /* RTC_MISR_ALRAMF */
|
||||
#if defined(RTC_ISR_ALRAF)
|
||||
#else
|
||||
#define __HAL_RTC_ALARM_GET_IT(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->ISR)& (__INTERRUPT__ >> 4)) != 0U)? 1U : 0U)
|
||||
#endif /* RTC_ISR_ALRAF */
|
||||
#endif /* TAMP */
|
||||
|
||||
/**
|
||||
* @brief Check whether the specified RTC Alarm interrupt has been enabled or not.
|
||||
@ -798,7 +710,7 @@ typedef void (*pRTC_CallbackTypeDef)(RTC_HandleTypeDef *hrtc); /*!< pointer to
|
||||
*/
|
||||
#define __HAL_RTC_ALARM_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->CR) & (__INTERRUPT__)) != 0U) ? 1U : 0U)
|
||||
|
||||
#if defined(RTC_SR_ALRAF)
|
||||
#if defined(TAMP)
|
||||
/**
|
||||
* @brief Get the selected RTC Alarm's flag status.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
@ -809,8 +721,7 @@ typedef void (*pRTC_CallbackTypeDef)(RTC_HandleTypeDef *hrtc); /*!< pointer to
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_ALARM_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->SR) & (__FLAG__)) != 0U) ? 1U : 0U)
|
||||
#endif /* RTC_SR_ALRAF */
|
||||
#if defined(RTC_ISR_ALRAF)
|
||||
#else
|
||||
/**
|
||||
* @brief Get the selected RTC Alarm's flag status.
|
||||
* @param __HANDLE__ specifies the RTC handle.
|
||||
@ -823,7 +734,7 @@ typedef void (*pRTC_CallbackTypeDef)(RTC_HandleTypeDef *hrtc); /*!< pointer to
|
||||
* @retval None
|
||||
*/
|
||||
#define __HAL_RTC_ALARM_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != 0U) ? 1U : 0U)
|
||||
#endif /* RTC_ISR_ALRAF */
|
||||
#endif /* TAMP */
|
||||
|
||||
/**
|
||||
* @brief Clear the RTC Alarm's pending flags.
|
||||
@ -834,12 +745,11 @@ typedef void (*pRTC_CallbackTypeDef)(RTC_HandleTypeDef *hrtc); /*!< pointer to
|
||||
* @arg @ref RTC_FLAG_ALRBF
|
||||
* @retval None
|
||||
*/
|
||||
#if defined(RTC_SCR_CALRAF)
|
||||
#define __HAL_RTC_ALARM_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SCR |= __FLAG__)
|
||||
#endif /* RTC_SCR_CALRAF */
|
||||
#if defined(RTC_ISR_ALRAF)
|
||||
#if defined(TAMP)
|
||||
#define __HAL_RTC_ALARM_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->SCR = __FLAG__)
|
||||
#else
|
||||
#define __HAL_RTC_ALARM_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR = (~((__FLAG__) | RTC_ISR_INIT)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT)))
|
||||
#endif /* RTC_ISR_ALRAF */
|
||||
#endif /* TAMP */
|
||||
|
||||
|
||||
/**
|
||||
@ -1086,13 +996,13 @@ HAL_RTCStateTypeDef HAL_RTC_GetState(RTC_HandleTypeDef *hrtc);
|
||||
|
||||
#define RTC_INIT_MASK 0xFFFFFFFFu
|
||||
|
||||
#if defined(RTC_ICSR_INIT) && defined(RTC_ICSR_RSF)
|
||||
#if defined(TAMP)
|
||||
#define RTC_ICSR_RESERVED_MASK 0x000100FFu
|
||||
#define RTC_RSF_MASK (~(RTC_ICSR_INIT | RTC_ICSR_RSF))
|
||||
#endif /* RTC_ICSR_INIT && RTC_ICSR_RSF */
|
||||
|
||||
#if defined(RTC_ISR_INIT) && defined(RTC_ISR_RSF)
|
||||
#else
|
||||
#define RTC_ISR_RESERVED_MASK 0x0003FFFFu
|
||||
#define RTC_RSF_MASK (~(RTC_ISR_INIT | RTC_ISR_RSF))
|
||||
#endif /* RTC_ISR_INIT && RTC_ISR_RSF */
|
||||
#endif /* TAMP */
|
||||
|
||||
#define RTC_TIMEOUT_VALUE 1000u
|
||||
|
||||
@ -1111,18 +1021,18 @@ HAL_RTCStateTypeDef HAL_RTC_GetState(RTC_HandleTypeDef *hrtc);
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if defined(RTC_CR_TAMPOE)
|
||||
#if defined(TAMP)
|
||||
#define IS_RTC_OUTPUT(OUTPUT) (((OUTPUT) == RTC_OUTPUT_DISABLE) || \
|
||||
((OUTPUT) == RTC_OUTPUT_ALARMA) || \
|
||||
((OUTPUT) == RTC_OUTPUT_ALARMB) || \
|
||||
((OUTPUT) == RTC_OUTPUT_WAKEUP) || \
|
||||
((OUTPUT) == RTC_OUTPUT_TAMPER))
|
||||
#else /* RTC_CR_TAMPOE not defined */
|
||||
#else
|
||||
#define IS_RTC_OUTPUT(OUTPUT) (((OUTPUT) == RTC_OUTPUT_DISABLE) || \
|
||||
((OUTPUT) == RTC_OUTPUT_ALARMA) || \
|
||||
((OUTPUT) == RTC_OUTPUT_ALARMB) || \
|
||||
((OUTPUT) == RTC_OUTPUT_WAKEUP))
|
||||
#endif /* RTC_CR_TAMPOE */
|
||||
#endif /* TAMP */
|
||||
|
||||
#define IS_RTC_HOUR_FORMAT(FORMAT) (((FORMAT) == RTC_HOURFORMAT_12) || \
|
||||
((FORMAT) == RTC_HOURFORMAT_24))
|
||||
@ -1133,10 +1043,10 @@ HAL_RTCStateTypeDef HAL_RTC_GetState(RTC_HandleTypeDef *hrtc);
|
||||
#define IS_RTC_OUTPUT_TYPE(TYPE) (((TYPE) == RTC_OUTPUT_TYPE_OPENDRAIN) || \
|
||||
((TYPE) == RTC_OUTPUT_TYPE_PUSHPULL))
|
||||
|
||||
#if defined(RTC_CR_TAMPALRM_PU)
|
||||
#if defined(TAMP)
|
||||
#define IS_RTC_OUTPUT_PULLUP(TYPE) (((TYPE) == RTC_OUTPUT_PULLUP_NONE) || \
|
||||
((TYPE) == RTC_OUTPUT_PULLUP_ON))
|
||||
#endif /* RTC_CR_TAMPALRM_PU */
|
||||
#endif /* TAMP */
|
||||
|
||||
#define IS_RTC_OUTPUT_REMAP(REMAP) (((REMAP) == RTC_OUTPUT_REMAP_NONE) || \
|
||||
((REMAP) == RTC_OUTPUT_REMAP_POS1))
|
||||
|
||||
Reference in New Issue
Block a user