123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- /**
- ******************************************************************************
- * @brief IWDG header file of the firmware library.
- ******************************************************************************
- */
- /* Define to prevent recursive inclusion -------------------------------------*/
- #ifndef __GD32F10X_IWDG_H
- #define __GD32F10X_IWDG_H
- /* Exported macro ------------------------------------------------------------*/
- #ifdef __cplusplus
- extern "C" {
- #endif
- /* Includes ------------------------------------------------------------------*/
- #include "gd32f10x.h"
- /** @addtogroup GD32F10x_Firmware
- * @{
- */
- /** @defgroup IWDG
- * @{
- */
- /** @defgroup IWDG_Exported_Constants
- * @{
- */
- /** @defgroup IWDG_WriteAccess
- * @{
- */
- #define IWDG_WRITEACCESS_ENABLE ((uint16_t)0x5555)
- #define IWDG_WRITEACCESS_DISABLE ((uint16_t)0x0000)
- /**
- * @}
- */
- /** @defgroup IWDG_prescaler
- * @{
- */
- #define IWDG_PRESCALER_4 ((uint8_t)0x00)
- #define IWDG_PRESCALER_8 ((uint8_t)0x01)
- #define IWDG_PRESCALER_16 ((uint8_t)0x02)
- #define IWDG_PRESCALER_32 ((uint8_t)0x03)
- #define IWDG_PRESCALER_64 ((uint8_t)0x04)
- #define IWDG_PRESCALER_128 ((uint8_t)0x05)
- #define IWDG_PRESCALER_256 ((uint8_t)0x06)
- /**
- * @}
- */
- /** @defgroup IWDG_Flag
- * @{
- */
- #define IWDG_BIT_PUD IWDG_STR_PUD
- #define IWDG_BIT_RUD IWDG_STR_RUD
- #define IWDG_BIT_WUD IWDG_STR_WUD
- /**
- * @}
- */
- /**
- * @}
- */
- /** @defgroup IWDG_Exported_functions
- * @{
- */
- /* Prescaler and Counter configuration functions ******************************/
- void IWDG_Write_Enable(uint16_t IWDG_WriteAccess);
- void IWDG_SetPrescaler(uint8_t PrescalerValue);
- void IWDG_SetReloadValue(uint16_t ReloadValue);
- void IWDG_ReloadCounter(void);
- /* IWDG activation function ***************************************************/
- void IWDG_Enable(void);
- /* Flag management function ***************************************************/
- TypeState IWDG_GetBitState(uint16_t IWDG_FLAG);
- /**
- * @}
- */
- #ifdef __cplusplus
- }
- #endif
- #endif /* __IWDG_GD32F10X_H */
- /**
- * @}
- */
- /**
- * @}
- */
|