version_2.0

Dependents:   cc3000_ping_demo_try_2

Fork of mbed by mbed official

Committer:
emilmont
Date:
Fri Feb 14 14:36:43 2014 +0000
Revision:
77:869cf507173a
Child:
81:7d30d6019079
Release 77 of the mbed library

Main changes:
* Add target NUCLEO_F030R8
* Add target NUCLEO_F401RE
* Add target NUCLEO_F103RB
* Add target NUCLEO_L152RE

Who changed what in which revision?

UserRevisionLine numberNew contents of line
emilmont 77:869cf507173a 1 /**
emilmont 77:869cf507173a 2 ******************************************************************************
emilmont 77:869cf507173a 3 * @file stm32f0xx_iwdg.h
emilmont 77:869cf507173a 4 * @author MCD Application Team
emilmont 77:869cf507173a 5 * @version V1.3.0
emilmont 77:869cf507173a 6 * @date 16-January-2014
emilmont 77:869cf507173a 7 * @brief This file contains all the functions prototypes for the IWDG
emilmont 77:869cf507173a 8 * firmware library.
emilmont 77:869cf507173a 9 ******************************************************************************
emilmont 77:869cf507173a 10 * @attention
emilmont 77:869cf507173a 11 *
emilmont 77:869cf507173a 12 * <h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2>
emilmont 77:869cf507173a 13 *
emilmont 77:869cf507173a 14 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
emilmont 77:869cf507173a 15 * You may not use this file except in compliance with the License.
emilmont 77:869cf507173a 16 * You may obtain a copy of the License at:
emilmont 77:869cf507173a 17 *
emilmont 77:869cf507173a 18 * http://www.st.com/software_license_agreement_liberty_v2
emilmont 77:869cf507173a 19 *
emilmont 77:869cf507173a 20 * Unless required by applicable law or agreed to in writing, software
emilmont 77:869cf507173a 21 * distributed under the License is distributed on an "AS IS" BASIS,
emilmont 77:869cf507173a 22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
emilmont 77:869cf507173a 23 * See the License for the specific language governing permissions and
emilmont 77:869cf507173a 24 * limitations under the License.
emilmont 77:869cf507173a 25 *
emilmont 77:869cf507173a 26 ******************************************************************************
emilmont 77:869cf507173a 27 */
emilmont 77:869cf507173a 28
emilmont 77:869cf507173a 29 /* Define to prevent recursive inclusion -------------------------------------*/
emilmont 77:869cf507173a 30 #ifndef __STM32F0XX_IWDG_H
emilmont 77:869cf507173a 31 #define __STM32F0XX_IWDG_H
emilmont 77:869cf507173a 32
emilmont 77:869cf507173a 33 #ifdef __cplusplus
emilmont 77:869cf507173a 34 extern "C" {
emilmont 77:869cf507173a 35 #endif
emilmont 77:869cf507173a 36
emilmont 77:869cf507173a 37 /* Includes ------------------------------------------------------------------*/
emilmont 77:869cf507173a 38 #include "stm32f0xx.h"
emilmont 77:869cf507173a 39
emilmont 77:869cf507173a 40 /** @addtogroup STM32F0xx_StdPeriph_Driver
emilmont 77:869cf507173a 41 * @{
emilmont 77:869cf507173a 42 */
emilmont 77:869cf507173a 43
emilmont 77:869cf507173a 44 /** @addtogroup IWDG
emilmont 77:869cf507173a 45 * @{
emilmont 77:869cf507173a 46 */
emilmont 77:869cf507173a 47
emilmont 77:869cf507173a 48 /* Exported types ------------------------------------------------------------*/
emilmont 77:869cf507173a 49 /* Exported constants --------------------------------------------------------*/
emilmont 77:869cf507173a 50
emilmont 77:869cf507173a 51 /** @defgroup IWDG_Exported_Constants
emilmont 77:869cf507173a 52 * @{
emilmont 77:869cf507173a 53 */
emilmont 77:869cf507173a 54
emilmont 77:869cf507173a 55 /** @defgroup IWDG_WriteAccess
emilmont 77:869cf507173a 56 * @{
emilmont 77:869cf507173a 57 */
emilmont 77:869cf507173a 58
emilmont 77:869cf507173a 59 #define IWDG_WriteAccess_Enable ((uint16_t)0x5555)
emilmont 77:869cf507173a 60 #define IWDG_WriteAccess_Disable ((uint16_t)0x0000)
emilmont 77:869cf507173a 61 #define IS_IWDG_WRITE_ACCESS(ACCESS) (((ACCESS) == IWDG_WriteAccess_Enable) || \
emilmont 77:869cf507173a 62 ((ACCESS) == IWDG_WriteAccess_Disable))
emilmont 77:869cf507173a 63 /**
emilmont 77:869cf507173a 64 * @}
emilmont 77:869cf507173a 65 */
emilmont 77:869cf507173a 66
emilmont 77:869cf507173a 67 /** @defgroup IWDG_prescaler
emilmont 77:869cf507173a 68 * @{
emilmont 77:869cf507173a 69 */
emilmont 77:869cf507173a 70
emilmont 77:869cf507173a 71 #define IWDG_Prescaler_4 ((uint8_t)0x00)
emilmont 77:869cf507173a 72 #define IWDG_Prescaler_8 ((uint8_t)0x01)
emilmont 77:869cf507173a 73 #define IWDG_Prescaler_16 ((uint8_t)0x02)
emilmont 77:869cf507173a 74 #define IWDG_Prescaler_32 ((uint8_t)0x03)
emilmont 77:869cf507173a 75 #define IWDG_Prescaler_64 ((uint8_t)0x04)
emilmont 77:869cf507173a 76 #define IWDG_Prescaler_128 ((uint8_t)0x05)
emilmont 77:869cf507173a 77 #define IWDG_Prescaler_256 ((uint8_t)0x06)
emilmont 77:869cf507173a 78 #define IS_IWDG_PRESCALER(PRESCALER) (((PRESCALER) == IWDG_Prescaler_4) || \
emilmont 77:869cf507173a 79 ((PRESCALER) == IWDG_Prescaler_8) || \
emilmont 77:869cf507173a 80 ((PRESCALER) == IWDG_Prescaler_16) || \
emilmont 77:869cf507173a 81 ((PRESCALER) == IWDG_Prescaler_32) || \
emilmont 77:869cf507173a 82 ((PRESCALER) == IWDG_Prescaler_64) || \
emilmont 77:869cf507173a 83 ((PRESCALER) == IWDG_Prescaler_128)|| \
emilmont 77:869cf507173a 84 ((PRESCALER) == IWDG_Prescaler_256))
emilmont 77:869cf507173a 85 /**
emilmont 77:869cf507173a 86 * @}
emilmont 77:869cf507173a 87 */
emilmont 77:869cf507173a 88
emilmont 77:869cf507173a 89 /** @defgroup IWDG_Flag
emilmont 77:869cf507173a 90 * @{
emilmont 77:869cf507173a 91 */
emilmont 77:869cf507173a 92
emilmont 77:869cf507173a 93 #define IWDG_FLAG_PVU IWDG_SR_PVU
emilmont 77:869cf507173a 94 #define IWDG_FLAG_RVU IWDG_SR_RVU
emilmont 77:869cf507173a 95 #define IWDG_FLAG_WVU IWDG_SR_WVU
emilmont 77:869cf507173a 96 #define IS_IWDG_FLAG(FLAG) (((FLAG) == IWDG_FLAG_PVU) || ((FLAG) == IWDG_FLAG_RVU) || \
emilmont 77:869cf507173a 97 ((FLAG) == IWDG_FLAG_WVU))
emilmont 77:869cf507173a 98
emilmont 77:869cf507173a 99 #define IS_IWDG_RELOAD(RELOAD) ((RELOAD) <= 0xFFF)
emilmont 77:869cf507173a 100
emilmont 77:869cf507173a 101 #define IS_IWDG_WINDOW_VALUE(VALUE) ((VALUE) <= 0xFFF)
emilmont 77:869cf507173a 102 /**
emilmont 77:869cf507173a 103 * @}
emilmont 77:869cf507173a 104 */
emilmont 77:869cf507173a 105
emilmont 77:869cf507173a 106 /**
emilmont 77:869cf507173a 107 * @}
emilmont 77:869cf507173a 108 */
emilmont 77:869cf507173a 109
emilmont 77:869cf507173a 110 /* Exported macro ------------------------------------------------------------*/
emilmont 77:869cf507173a 111 /* Exported functions ------------------------------------------------------- */
emilmont 77:869cf507173a 112
emilmont 77:869cf507173a 113 /* Prescaler and Counter configuration functions ******************************/
emilmont 77:869cf507173a 114 void IWDG_WriteAccessCmd(uint16_t IWDG_WriteAccess);
emilmont 77:869cf507173a 115 void IWDG_SetPrescaler(uint8_t IWDG_Prescaler);
emilmont 77:869cf507173a 116 void IWDG_SetReload(uint16_t Reload);
emilmont 77:869cf507173a 117 void IWDG_ReloadCounter(void);
emilmont 77:869cf507173a 118 void IWDG_SetWindowValue(uint16_t WindowValue);
emilmont 77:869cf507173a 119
emilmont 77:869cf507173a 120 /* IWDG activation function ***************************************************/
emilmont 77:869cf507173a 121 void IWDG_Enable(void);
emilmont 77:869cf507173a 122
emilmont 77:869cf507173a 123 /* Flag management function ***************************************************/
emilmont 77:869cf507173a 124 FlagStatus IWDG_GetFlagStatus(uint16_t IWDG_FLAG);
emilmont 77:869cf507173a 125
emilmont 77:869cf507173a 126 #ifdef __cplusplus
emilmont 77:869cf507173a 127 }
emilmont 77:869cf507173a 128 #endif
emilmont 77:869cf507173a 129
emilmont 77:869cf507173a 130 #endif /* __STM32F0XX_IWDG_H */
emilmont 77:869cf507173a 131
emilmont 77:869cf507173a 132 /**
emilmont 77:869cf507173a 133 * @}
emilmont 77:869cf507173a 134 */
emilmont 77:869cf507173a 135
emilmont 77:869cf507173a 136 /**
emilmont 77:869cf507173a 137 * @}
emilmont 77:869cf507173a 138 */
emilmont 77:869cf507173a 139
emilmont 77:869cf507173a 140 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/