Subversion Repositories LedShow

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 9
Line 4... Line 4...
4
  * @author  MCD Application Team
4
  * @author  MCD Application Team
5
  * @brief   Header file of IWDG HAL module.
5
  * @brief   Header file of IWDG HAL module.
6
  ******************************************************************************
6
  ******************************************************************************
7
  * @attention
7
  * @attention
8
  *
8
  *
9
  * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
9
  * <h2><center>&copy; Copyright (c) 2016 STMicroelectronics.
-
 
10
  * All rights reserved.</center></h2>
10
  *
11
  *
11
  * Redistribution and use in source and binary forms, with or without modification,
12
  * This software component is licensed by ST under BSD 3-Clause license,
12
  * are permitted provided that the following conditions are met:
13
  * the "License"; You may not use this file except in compliance with the
13
  *   1. Redistributions of source code must retain the above copyright notice,
-
 
14
  *      this list of conditions and the following disclaimer.
-
 
15
  *   2. Redistributions in binary form must reproduce the above copyright notice,
-
 
16
  *      this list of conditions and the following disclaimer in the documentation
-
 
17
  *      and/or other materials provided with the distribution.
14
  * License. You may obtain a copy of the License at:
18
  *   3. Neither the name of STMicroelectronics nor the names of its contributors
-
 
19
  *      may be used to endorse or promote products derived from this software
15
  *                        opensource.org/licenses/BSD-3-Clause
20
  *      without specific prior written permission.
-
 
21
  *
-
 
22
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-
 
23
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-
 
24
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-
 
25
  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-
 
26
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-
 
27
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-
 
28
  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-
 
29
  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-
 
30
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-
 
31
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
 
32
  *
16
  *
33
  ******************************************************************************
17
  ******************************************************************************
34
  */
18
  */
35
 
19
 
36
/* Define to prevent recursive inclusion -------------------------------------*/
20
/* Define to prevent recursive inclusion -------------------------------------*/
37
#ifndef __STM32F1xx_HAL_IWDG_H
21
#ifndef STM32F1xx_HAL_IWDG_H
38
#define __STM32F1xx_HAL_IWDG_H
22
#define STM32F1xx_HAL_IWDG_H
39
 
23
 
40
#ifdef __cplusplus
24
#ifdef __cplusplus
41
extern "C" {
25
extern "C" {
42
#endif
26
#endif
43
 
27
 
Line 46... Line 30...
46
 
30
 
47
/** @addtogroup STM32F1xx_HAL_Driver
31
/** @addtogroup STM32F1xx_HAL_Driver
48
  * @{
32
  * @{
49
  */
33
  */
50
 
34
 
51
/** @addtogroup IWDG
35
/** @defgroup IWDG IWDG
52
  * @{
36
  * @{
53
  */
37
  */
54
 
38
 
55
/* Exported types ------------------------------------------------------------*/
39
/* Exported types ------------------------------------------------------------*/
56
/** @defgroup IWDG_Exported_Types IWDG Exported Types
40
/** @defgroup IWDG_Exported_Types IWDG Exported Types
Line 76... Line 60...
76
typedef struct
60
typedef struct
77
{
61
{
78
  IWDG_TypeDef                 *Instance;  /*!< Register base address    */
62
  IWDG_TypeDef                 *Instance;  /*!< Register base address    */
79
 
63
 
80
  IWDG_InitTypeDef             Init;       /*!< IWDG required parameters */
64
  IWDG_InitTypeDef             Init;       /*!< IWDG required parameters */
81
 
-
 
82
} IWDG_HandleTypeDef;
65
} IWDG_HandleTypeDef;
83
 
66
 
-
 
67
 
84
/**
68
/**
85
  * @}
69
  * @}
86
  */
70
  */
87
 
71
 
88
/* Exported constants --------------------------------------------------------*/
72
/* Exported constants --------------------------------------------------------*/
Line 91... Line 75...
91
  */
75
  */
92
 
76
 
93
/** @defgroup IWDG_Prescaler IWDG Prescaler
77
/** @defgroup IWDG_Prescaler IWDG Prescaler
94
  * @{
78
  * @{
95
  */
79
  */
96
#define IWDG_PRESCALER_4                0x00000000U                   /*!< IWDG prescaler set to 4   */
80
#define IWDG_PRESCALER_4                0x00000000U                                     /*!< IWDG prescaler set to 4   */
97
#define IWDG_PRESCALER_8                IWDG_PR_PR_0                  /*!< IWDG prescaler set to 8   */
81
#define IWDG_PRESCALER_8                IWDG_PR_PR_0                                    /*!< IWDG prescaler set to 8   */
98
#define IWDG_PRESCALER_16               IWDG_PR_PR_1                  /*!< IWDG prescaler set to 16  */
82
#define IWDG_PRESCALER_16               IWDG_PR_PR_1                                    /*!< IWDG prescaler set to 16  */
99
#define IWDG_PRESCALER_32               (IWDG_PR_PR_1 | IWDG_PR_PR_0) /*!< IWDG prescaler set to 32  */
83
#define IWDG_PRESCALER_32               (IWDG_PR_PR_1 | IWDG_PR_PR_0)                   /*!< IWDG prescaler set to 32  */
100
#define IWDG_PRESCALER_64               IWDG_PR_PR_2                  /*!< IWDG prescaler set to 64  */
84
#define IWDG_PRESCALER_64               IWDG_PR_PR_2                                    /*!< IWDG prescaler set to 64  */
101
#define IWDG_PRESCALER_128              (IWDG_PR_PR_2 | IWDG_PR_PR_0) /*!< IWDG prescaler set to 128 */
85
#define IWDG_PRESCALER_128              (IWDG_PR_PR_2 | IWDG_PR_PR_0)                   /*!< IWDG prescaler set to 128 */
102
#define IWDG_PRESCALER_256              (IWDG_PR_PR_2 | IWDG_PR_PR_1) /*!< IWDG prescaler set to 256 */
86
#define IWDG_PRESCALER_256              (IWDG_PR_PR_2 | IWDG_PR_PR_1)                   /*!< IWDG prescaler set to 256 */
-
 
87
 
103
/**
88
/**
104
  * @}
89
  * @}
105
  */
90
  */
106
 
91
 
-
 
92
 
-
 
93
 
107
/**
94
/**
108
  * @}
95
  * @}
109
  */
96
  */
110
 
97
 
111
 
-
 
112
/* Exported macros -----------------------------------------------------------*/
98
/* Exported macros -----------------------------------------------------------*/
113
/** @defgroup IWDG_Exported_Macros IWDG Exported Macros
99
/** @defgroup IWDG_Exported_Macros IWDG Exported Macros
114
  * @{
100
  * @{
115
  */
101
  */
116
 
102
 
Line 121... Line 107...
121
  */
107
  */
122
#define __HAL_IWDG_START(__HANDLE__)                WRITE_REG((__HANDLE__)->Instance->KR, IWDG_KEY_ENABLE)
108
#define __HAL_IWDG_START(__HANDLE__)                WRITE_REG((__HANDLE__)->Instance->KR, IWDG_KEY_ENABLE)
123
 
109
 
124
/**
110
/**
125
  * @brief  Reload IWDG counter with value defined in the reload register
111
  * @brief  Reload IWDG counter with value defined in the reload register
126
  *         (write access to IWDG_PR & IWDG_RLR registers disabled).
112
  *         (write access to IWDG_PR and IWDG_RLR registers disabled).
127
  * @param  __HANDLE__  IWDG handle
113
  * @param  __HANDLE__  IWDG handle
128
  * @retval None
114
  * @retval None
129
  */
115
  */
130
#define __HAL_IWDG_RELOAD_COUNTER(__HANDLE__)       WRITE_REG((__HANDLE__)->Instance->KR, IWDG_KEY_RELOAD)
116
#define __HAL_IWDG_RELOAD_COUNTER(__HANDLE__)       WRITE_REG((__HANDLE__)->Instance->KR, IWDG_KEY_RELOAD)
131
 
117
 
Line 214... Line 200...
214
  * @param  __RELOAD__  IWDG reload value
200
  * @param  __RELOAD__  IWDG reload value
215
  * @retval None
201
  * @retval None
216
  */
202
  */
217
#define IS_IWDG_RELOAD(__RELOAD__)            ((__RELOAD__) <= IWDG_RLR_RL)
203
#define IS_IWDG_RELOAD(__RELOAD__)            ((__RELOAD__) <= IWDG_RLR_RL)
218
 
204
 
-
 
205
 
-
 
206
 
219
/**
207
/**
220
  * @}
208
  * @}
221
  */
209
  */
222
 
210
 
223
/**
211
/**
Line 231... Line 219...
231
 
219
 
232
#ifdef __cplusplus
220
#ifdef __cplusplus
233
}
221
}
234
#endif
222
#endif
235
 
223
 
236
#endif /* __STM32F1xx_HAL_IWDG_H */
224
#endif /* STM32F1xx_HAL_IWDG_H */
237
 
225
 
238
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
226
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/