1 |
577 |
jeremybenn |
/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
|
2 |
|
|
* File Name : 75x_wdg.h
|
3 |
|
|
* Author : MCD Application Team
|
4 |
|
|
* Date First Issued : 03/10/2006
|
5 |
|
|
* Description : This file contains all the functions prototypes for the
|
6 |
|
|
* WDG software library.
|
7 |
|
|
********************************************************************************
|
8 |
|
|
* History:
|
9 |
|
|
* 07/17/2006 : V1.0
|
10 |
|
|
* 03/10/2006 : V0.1
|
11 |
|
|
********************************************************************************
|
12 |
|
|
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
|
13 |
|
|
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
|
14 |
|
|
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
|
15 |
|
|
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
|
16 |
|
|
* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
|
17 |
|
|
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
|
18 |
|
|
*******************************************************************************/
|
19 |
|
|
|
20 |
|
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
21 |
|
|
#ifndef __75x_WDG_H
|
22 |
|
|
#define __75x_WDG_H
|
23 |
|
|
|
24 |
|
|
/* Includes ------------------------------------------------------------------*/
|
25 |
|
|
#include "75x_map.h"
|
26 |
|
|
|
27 |
|
|
/* Exported types ------------------------------------------------------------*/
|
28 |
|
|
typedef struct
|
29 |
|
|
{
|
30 |
|
|
u16 WDG_Mode; /* Watchdog or Timer mode */
|
31 |
|
|
u16 WDG_Preload; /* Preload register */
|
32 |
|
|
u8 WDG_Prescaler; /* Prescaler register */
|
33 |
|
|
}WDG_InitTypeDef;
|
34 |
|
|
/* Exported constants --------------------------------------------------------*/
|
35 |
|
|
|
36 |
|
|
/* WDG/Timer Select */
|
37 |
|
|
#define WDG_Mode_WDG 0x0001
|
38 |
|
|
#define WDG_Mode_Timer 0xFFFE
|
39 |
|
|
|
40 |
|
|
/* WDG End of Count interrupt request */
|
41 |
|
|
#define WDG_IT_EC 0x0001
|
42 |
|
|
|
43 |
|
|
/* WDG end of count Flag */
|
44 |
|
|
#define WDG_FLAG_EC 0x0001
|
45 |
|
|
|
46 |
|
|
/* Exported macro ------------------------------------------------------------*/
|
47 |
|
|
/* Exported functions ------------------------------------------------------- */
|
48 |
|
|
|
49 |
|
|
void WDG_DeInit(void);
|
50 |
|
|
void WDG_Init(WDG_InitTypeDef* WDG_InitStruct);
|
51 |
|
|
void WDG_StructInit(WDG_InitTypeDef* WDG_InitStruct);
|
52 |
|
|
void WDG_Cmd(FunctionalState NewState);
|
53 |
|
|
void WDG_ITConfig(FunctionalState NewState);
|
54 |
|
|
u16 WDG_GetCounter(void);
|
55 |
|
|
FlagStatus WDG_GetFlagStatus(void);
|
56 |
|
|
void WDG_ClearFlag(void);
|
57 |
|
|
ITStatus WDG_GetITStatus(void);
|
58 |
|
|
void WDG_ClearITPendingBit(void);
|
59 |
|
|
|
60 |
|
|
#endif /* __WDG_H */
|
61 |
|
|
|
62 |
|
|
/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
|