stm32f10x_iwdg.h

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    stm32f10x_iwdg.h
00004   * @author  MCD Application Team
00005   * @version V3.4.0
00006   * @date    10/15/2010
00007   * @brief   This file contains all the functions prototypes for the IWDG 
00008   *          firmware library.
00009   ******************************************************************************
00010   * @copy
00011   *
00012   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00013   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
00014   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
00015   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
00016   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
00017   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00018   *
00019   * <h2><center>&copy; COPYRIGHT 2010 STMicroelectronics</center></h2>
00020   */ 
00021 
00022 /* Define to prevent recursive inclusion -------------------------------------*/
00023 #ifndef __STM32F10x_IWDG_H
00024 #define __STM32F10x_IWDG_H
00025 
00026 #ifdef __cplusplus
00027  extern "C" {
00028 #endif
00029 
00030 /* Includes ------------------------------------------------------------------*/
00031 #include "stm32f10x.h"
00032 
00033 /** @addtogroup STM32F10x_StdPeriph_Driver
00034   * @{
00035   */
00036 
00037 /** @addtogroup IWDG
00038   * @{
00039   */
00040 
00041 /** @defgroup IWDG_Exported_Types
00042   * @{
00043   */
00044 
00045 /**
00046   * @}
00047   */
00048 
00049 /** @defgroup IWDG_Exported_Constants
00050   * @{
00051   */
00052 
00053 /** @defgroup IWDG_WriteAccess
00054   * @{
00055   */
00056 
00057 #define IWDG_WriteAccess_Enable     ((uint16_t)0x5555)
00058 #define IWDG_WriteAccess_Disable    ((uint16_t)0x0000)
00059 #define IS_IWDG_WRITE_ACCESS(ACCESS) (((ACCESS) == IWDG_WriteAccess_Enable) || \
00060                                       ((ACCESS) == IWDG_WriteAccess_Disable))
00061 /**
00062   * @}
00063   */
00064 
00065 /** @defgroup IWDG_prescaler 
00066   * @{
00067   */
00068 
00069 #define IWDG_Prescaler_4            ((uint8_t)0x00)
00070 #define IWDG_Prescaler_8            ((uint8_t)0x01)
00071 #define IWDG_Prescaler_16           ((uint8_t)0x02)
00072 #define IWDG_Prescaler_32           ((uint8_t)0x03)
00073 #define IWDG_Prescaler_64           ((uint8_t)0x04)
00074 #define IWDG_Prescaler_128          ((uint8_t)0x05)
00075 #define IWDG_Prescaler_256          ((uint8_t)0x06)
00076 #define IS_IWDG_PRESCALER(PRESCALER) (((PRESCALER) == IWDG_Prescaler_4)  || \
00077                                       ((PRESCALER) == IWDG_Prescaler_8)  || \
00078                                       ((PRESCALER) == IWDG_Prescaler_16) || \
00079                                       ((PRESCALER) == IWDG_Prescaler_32) || \
00080                                       ((PRESCALER) == IWDG_Prescaler_64) || \
00081                                       ((PRESCALER) == IWDG_Prescaler_128)|| \
00082                                       ((PRESCALER) == IWDG_Prescaler_256))
00083 /**
00084   * @}
00085   */
00086 
00087 /** @defgroup IWDG_Flag 
00088   * @{
00089   */
00090 
00091 #define IWDG_FLAG_PVU               ((uint16_t)0x0001)
00092 #define IWDG_FLAG_RVU               ((uint16_t)0x0002)
00093 #define IS_IWDG_FLAG(FLAG) (((FLAG) == IWDG_FLAG_PVU) || ((FLAG) == IWDG_FLAG_RVU))
00094 #define IS_IWDG_RELOAD(RELOAD) ((RELOAD) <= 0xFFF)
00095 /**
00096   * @}
00097   */
00098 
00099 /**
00100   * @}
00101   */
00102 
00103 /** @defgroup IWDG_Exported_Macros
00104   * @{
00105   */
00106 
00107 /**
00108   * @}
00109   */
00110 
00111 /** @defgroup IWDG_Exported_Functions
00112   * @{
00113   */
00114 
00115 void IWDG_WriteAccessCmd(uint16_t IWDG_WriteAccess);
00116 void IWDG_SetPrescaler(uint8_t IWDG_Prescaler);
00117 void IWDG_SetReload(uint16_t Reload);
00118 void IWDG_ReloadCounter(void);
00119 void IWDG_Enable(void);
00120 FlagStatus IWDG_GetFlagStatus(uint16_t IWDG_FLAG);
00121 
00122 #ifdef __cplusplus
00123 }
00124 #endif
00125 
00126 #endif /* __STM32F10x_IWDG_H */
00127 /**
00128   * @}
00129   */
00130 
00131 /**
00132   * @}
00133   */
00134 
00135 /**
00136   * @}
00137   */
00138 
00139 /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
STM32F10x Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit  www.st.com/STM32