1 |
608 |
jeremybenn |
/******************** (C) COPYRIGHT 2007 STMicroelectronics ********************
|
2 |
|
|
* File Name : stm32f10x_wwdg.h
|
3 |
|
|
* Author : MCD Application Team
|
4 |
|
|
* Date First Issued : 09/29/2006
|
5 |
|
|
* Description : This file contains all the functions prototypes for the
|
6 |
|
|
* WWDG firmware library.
|
7 |
|
|
********************************************************************************
|
8 |
|
|
* History:
|
9 |
|
|
* 04/02/2007: V0.2
|
10 |
|
|
* 02/05/2007: V0.1
|
11 |
|
|
* 09/29/2006: V0.01
|
12 |
|
|
********************************************************************************
|
13 |
|
|
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
|
14 |
|
|
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
|
15 |
|
|
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
|
16 |
|
|
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
|
17 |
|
|
* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
|
18 |
|
|
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
|
19 |
|
|
*******************************************************************************/
|
20 |
|
|
|
21 |
|
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
22 |
|
|
#ifndef __STM32F10x_WWDG_H
|
23 |
|
|
#define __STM32F10x_WWDG_H
|
24 |
|
|
|
25 |
|
|
/* Includes ------------------------------------------------------------------*/
|
26 |
|
|
#include "stm32f10x_map.h"
|
27 |
|
|
|
28 |
|
|
/* Exported types ------------------------------------------------------------*/
|
29 |
|
|
/* Exported constants --------------------------------------------------------*/
|
30 |
|
|
/* WWDG Prescaler */
|
31 |
|
|
#define WWDG_Prescaler_1 ((u32)0x00000000)
|
32 |
|
|
#define WWDG_Prescaler_2 ((u32)0x00000080)
|
33 |
|
|
#define WWDG_Prescaler_4 ((u32)0x00000100)
|
34 |
|
|
#define WWDG_Prescaler_8 ((u32)0x00000180)
|
35 |
|
|
|
36 |
|
|
#define IS_WWDG_PRESCALER(PRESCALER) ((PRESCALER == WWDG_Prescaler_1) || \
|
37 |
|
|
(PRESCALER == WWDG_Prescaler_2) || \
|
38 |
|
|
(PRESCALER == WWDG_Prescaler_4) || \
|
39 |
|
|
(PRESCALER == WWDG_Prescaler_8))
|
40 |
|
|
|
41 |
|
|
#define IS_WWDG_WINDOW_VALUE(VALUE) (VALUE <= 0x7F)
|
42 |
|
|
|
43 |
|
|
#define IS_WWDG_COUNTER(COUNTER) ((COUNTER >= 0x40) && (COUNTER <= 0x7F))
|
44 |
|
|
|
45 |
|
|
/* Exported macro ------------------------------------------------------------*/
|
46 |
|
|
/* Exported functions ------------------------------------------------------- */
|
47 |
|
|
void WWDG_DeInit(void);
|
48 |
|
|
void WWDG_SetPrescaler(u32 WWDG_Prescaler);
|
49 |
|
|
void WWDG_SetWindowValue(u8 WindowValue);
|
50 |
|
|
void WWDG_EnableIT(void);
|
51 |
|
|
void WWDG_SetCounter(u8 Counter);
|
52 |
|
|
void WWDG_Enable(u8 Counter);
|
53 |
|
|
FlagStatus WWDG_GetFlagStatus(void);
|
54 |
|
|
void WWDG_ClearFlag(void);
|
55 |
|
|
|
56 |
|
|
#endif /* __STM32F10x_WWDG_H */
|
57 |
|
|
|
58 |
|
|
/******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****/
|