Ermanno Brusadin / mbed-src
Committer:
ebrus
Date:
Wed Jul 27 18:35:32 2016 +0000
Revision:
0:0a673c671a56
4

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ebrus 0:0a673c671a56 1 /**
ebrus 0:0a673c671a56 2 ******************************************************************************
ebrus 0:0a673c671a56 3 * @file stm32f30x_wwdg.h
ebrus 0:0a673c671a56 4 * @author MCD Application Team
ebrus 0:0a673c671a56 5 * @version V1.1.0
ebrus 0:0a673c671a56 6 * @date 27-February-2014
ebrus 0:0a673c671a56 7 * @brief This file contains all the functions prototypes for the WWDG
ebrus 0:0a673c671a56 8 * firmware library.
ebrus 0:0a673c671a56 9 ******************************************************************************
ebrus 0:0a673c671a56 10 * @attention
ebrus 0:0a673c671a56 11 *
ebrus 0:0a673c671a56 12 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
ebrus 0:0a673c671a56 13 *
ebrus 0:0a673c671a56 14 * Redistribution and use in source and binary forms, with or without modification,
ebrus 0:0a673c671a56 15 * are permitted provided that the following conditions are met:
ebrus 0:0a673c671a56 16 * 1. Redistributions of source code must retain the above copyright notice,
ebrus 0:0a673c671a56 17 * this list of conditions and the following disclaimer.
ebrus 0:0a673c671a56 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
ebrus 0:0a673c671a56 19 * this list of conditions and the following disclaimer in the documentation
ebrus 0:0a673c671a56 20 * and/or other materials provided with the distribution.
ebrus 0:0a673c671a56 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
ebrus 0:0a673c671a56 22 * may be used to endorse or promote products derived from this software
ebrus 0:0a673c671a56 23 * without specific prior written permission.
ebrus 0:0a673c671a56 24 *
ebrus 0:0a673c671a56 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
ebrus 0:0a673c671a56 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
ebrus 0:0a673c671a56 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
ebrus 0:0a673c671a56 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
ebrus 0:0a673c671a56 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
ebrus 0:0a673c671a56 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
ebrus 0:0a673c671a56 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
ebrus 0:0a673c671a56 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
ebrus 0:0a673c671a56 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
ebrus 0:0a673c671a56 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ebrus 0:0a673c671a56 35 *
ebrus 0:0a673c671a56 36 ******************************************************************************
ebrus 0:0a673c671a56 37 */
ebrus 0:0a673c671a56 38
ebrus 0:0a673c671a56 39 /* Define to prevent recursive inclusion -------------------------------------*/
ebrus 0:0a673c671a56 40 #ifndef __STM32F30x_WWDG_H
ebrus 0:0a673c671a56 41 #define __STM32F30x_WWDG_H
ebrus 0:0a673c671a56 42
ebrus 0:0a673c671a56 43 #ifdef __cplusplus
ebrus 0:0a673c671a56 44 extern "C" {
ebrus 0:0a673c671a56 45 #endif
ebrus 0:0a673c671a56 46
ebrus 0:0a673c671a56 47 /* Includes ------------------------------------------------------------------*/
ebrus 0:0a673c671a56 48 #include "stm32f30x.h"
ebrus 0:0a673c671a56 49
ebrus 0:0a673c671a56 50 /** @addtogroup STM32F30x_StdPeriph_Driver
ebrus 0:0a673c671a56 51 * @{
ebrus 0:0a673c671a56 52 */
ebrus 0:0a673c671a56 53
ebrus 0:0a673c671a56 54 /** @addtogroup WWDG
ebrus 0:0a673c671a56 55 * @{
ebrus 0:0a673c671a56 56 */
ebrus 0:0a673c671a56 57 /* Exported types ------------------------------------------------------------*/
ebrus 0:0a673c671a56 58 /* Exported constants --------------------------------------------------------*/
ebrus 0:0a673c671a56 59
ebrus 0:0a673c671a56 60 /** @defgroup WWDG_Exported_Constants
ebrus 0:0a673c671a56 61 * @{
ebrus 0:0a673c671a56 62 */
ebrus 0:0a673c671a56 63
ebrus 0:0a673c671a56 64 /** @defgroup WWDG_Prescaler
ebrus 0:0a673c671a56 65 * @{
ebrus 0:0a673c671a56 66 */
ebrus 0:0a673c671a56 67
ebrus 0:0a673c671a56 68 #define WWDG_Prescaler_1 ((uint32_t)0x00000000)
ebrus 0:0a673c671a56 69 #define WWDG_Prescaler_2 ((uint32_t)0x00000080)
ebrus 0:0a673c671a56 70 #define WWDG_Prescaler_4 ((uint32_t)0x00000100)
ebrus 0:0a673c671a56 71 #define WWDG_Prescaler_8 ((uint32_t)0x00000180)
ebrus 0:0a673c671a56 72 #define IS_WWDG_PRESCALER(PRESCALER) (((PRESCALER) == WWDG_Prescaler_1) || \
ebrus 0:0a673c671a56 73 ((PRESCALER) == WWDG_Prescaler_2) || \
ebrus 0:0a673c671a56 74 ((PRESCALER) == WWDG_Prescaler_4) || \
ebrus 0:0a673c671a56 75 ((PRESCALER) == WWDG_Prescaler_8))
ebrus 0:0a673c671a56 76 #define IS_WWDG_WINDOW_VALUE(VALUE) ((VALUE) <= 0x7F)
ebrus 0:0a673c671a56 77 #define IS_WWDG_COUNTER(COUNTER) (((COUNTER) >= 0x40) && ((COUNTER) <= 0x7F))
ebrus 0:0a673c671a56 78
ebrus 0:0a673c671a56 79 /**
ebrus 0:0a673c671a56 80 * @}
ebrus 0:0a673c671a56 81 */
ebrus 0:0a673c671a56 82
ebrus 0:0a673c671a56 83 /**
ebrus 0:0a673c671a56 84 * @}
ebrus 0:0a673c671a56 85 */
ebrus 0:0a673c671a56 86
ebrus 0:0a673c671a56 87 /* Exported macro ------------------------------------------------------------*/
ebrus 0:0a673c671a56 88 /* Exported functions ------------------------------------------------------- */
ebrus 0:0a673c671a56 89 /* Function used to set the WWDG configuration to the default reset state ****/
ebrus 0:0a673c671a56 90 void WWDG_DeInit(void);
ebrus 0:0a673c671a56 91
ebrus 0:0a673c671a56 92 /* Prescaler, Refresh window and Counter configuration functions **************/
ebrus 0:0a673c671a56 93 void WWDG_SetPrescaler(uint32_t WWDG_Prescaler);
ebrus 0:0a673c671a56 94 void WWDG_SetWindowValue(uint8_t WindowValue);
ebrus 0:0a673c671a56 95 void WWDG_EnableIT(void);
ebrus 0:0a673c671a56 96 void WWDG_SetCounter(uint8_t Counter);
ebrus 0:0a673c671a56 97
ebrus 0:0a673c671a56 98 /* WWDG activation functions **************************************************/
ebrus 0:0a673c671a56 99 void WWDG_Enable(uint8_t Counter);
ebrus 0:0a673c671a56 100
ebrus 0:0a673c671a56 101 /* Interrupts and flags management functions **********************************/
ebrus 0:0a673c671a56 102 FlagStatus WWDG_GetFlagStatus(void);
ebrus 0:0a673c671a56 103 void WWDG_ClearFlag(void);
ebrus 0:0a673c671a56 104
ebrus 0:0a673c671a56 105 #ifdef __cplusplus
ebrus 0:0a673c671a56 106 }
ebrus 0:0a673c671a56 107 #endif
ebrus 0:0a673c671a56 108
ebrus 0:0a673c671a56 109 #endif /* __STM32F30x_WWDG_H */
ebrus 0:0a673c671a56 110
ebrus 0:0a673c671a56 111 /**
ebrus 0:0a673c671a56 112 * @}
ebrus 0:0a673c671a56 113 */
ebrus 0:0a673c671a56 114
ebrus 0:0a673c671a56 115 /**
ebrus 0:0a673c671a56 116 * @}
ebrus 0:0a673c671a56 117 */
ebrus 0:0a673c671a56 118
ebrus 0:0a673c671a56 119 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/