updated wait_ms(ms) to thread_sleep_for(ms) for Mbed OS 6
Drivers/BSP/STM32469I-Discovery/stm32469i_discovery.h@4:27609b3a44ed, 2021-06-09 (annotated)
- Committer:
- aa6164
- Date:
- Wed Jun 09 12:45:23 2021 +0000
- Revision:
- 4:27609b3a44ed
- Parent:
- 3:3cdfcc4f7c9d
Updated wait_ms() to thread_sleep_for() for Mbed OS 6+
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Jerome Coutant
2:123b894b49dd
|
1
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
2
|
******************************************************************************
|
|
Jerome Coutant
2:123b894b49dd
|
3
|
* @file stm32469i_discovery.h
|
|
Jerome Coutant
2:123b894b49dd
|
4
|
* @author MCD Application Team
|
|
Jerome Coutant
2:123b894b49dd
|
5
|
* @brief This file contains definitions for STM32469I-Discovery LEDs,
|
|
Jerome Coutant
2:123b894b49dd
|
6
|
* push-buttons hardware resources.
|
|
Jerome Coutant
2:123b894b49dd
|
7
|
******************************************************************************
|
|
Jerome Coutant
2:123b894b49dd
|
8
|
* @attention
|
|
Jerome Coutant
2:123b894b49dd
|
9
|
*
|
|
Jerome Coutant
2:123b894b49dd
|
10
|
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
|
Jerome Coutant
2:123b894b49dd
|
11
|
*
|
|
Jerome Coutant
2:123b894b49dd
|
12
|
* Redistribution and use in source and binary forms, with or without modification,
|
|
Jerome Coutant
2:123b894b49dd
|
13
|
* are permitted provided that the following conditions are met:
|
|
Jerome Coutant
2:123b894b49dd
|
14
|
* 1. Redistributions of source code must retain the above copyright notice,
|
|
Jerome Coutant
2:123b894b49dd
|
15
|
* this list of conditions and the following disclaimer.
|
|
Jerome Coutant
2:123b894b49dd
|
16
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
Jerome Coutant
2:123b894b49dd
|
17
|
* this list of conditions and the following disclaimer in the documentation
|
|
Jerome Coutant
2:123b894b49dd
|
18
|
* and/or other materials provided with the distribution.
|
|
Jerome Coutant
2:123b894b49dd
|
19
|
* 3. Neither the name of STMicroelectronics nor the names of its contributors
|
|
Jerome Coutant
2:123b894b49dd
|
20
|
* may be used to endorse or promote products derived from this software
|
|
Jerome Coutant
2:123b894b49dd
|
21
|
* without specific prior written permission.
|
|
Jerome Coutant
2:123b894b49dd
|
22
|
*
|
|
Jerome Coutant
2:123b894b49dd
|
23
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
Jerome Coutant
2:123b894b49dd
|
24
|
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
Jerome Coutant
2:123b894b49dd
|
25
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
Jerome Coutant
2:123b894b49dd
|
26
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
Jerome Coutant
2:123b894b49dd
|
27
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
Jerome Coutant
2:123b894b49dd
|
28
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
Jerome Coutant
2:123b894b49dd
|
29
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
Jerome Coutant
2:123b894b49dd
|
30
|
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
Jerome Coutant
2:123b894b49dd
|
31
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
Jerome Coutant
2:123b894b49dd
|
32
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
Jerome Coutant
2:123b894b49dd
|
33
|
*
|
|
Jerome Coutant
2:123b894b49dd
|
34
|
******************************************************************************
|
|
Jerome Coutant
2:123b894b49dd
|
35
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
36
|
|
|
Jerome Coutant
2:123b894b49dd
|
37
|
/* Define to prevent recursive inclusion -------------------------------------*/
|
|
Jerome Coutant
2:123b894b49dd
|
38
|
#ifndef __STM32469I_DISCOVERY_H
|
|
Jerome Coutant
2:123b894b49dd
|
39
|
#define __STM32469I_DISCOVERY_H
|
|
Jerome Coutant
2:123b894b49dd
|
40
|
|
|
Jerome Coutant
2:123b894b49dd
|
41
|
#ifdef __cplusplus
|
|
Jerome Coutant
2:123b894b49dd
|
42
|
extern "C" {
|
|
Jerome Coutant
2:123b894b49dd
|
43
|
#endif
|
|
Jerome Coutant
2:123b894b49dd
|
44
|
|
|
Jerome Coutant
2:123b894b49dd
|
45
|
/* Includes ------------------------------------------------------------------*/
|
|
Jerome Coutant
2:123b894b49dd
|
46
|
#include "stm32f4xx_hal.h"
|
|
Jerome Coutant
2:123b894b49dd
|
47
|
|
|
Jerome Coutant
2:123b894b49dd
|
48
|
// mbed
|
|
Jerome Coutant
2:123b894b49dd
|
49
|
void wait_ms(int ms);
|
|
Jerome Coutant
2:123b894b49dd
|
50
|
|
|
Jerome Coutant
2:123b894b49dd
|
51
|
/** @addtogroup BSP
|
|
Jerome Coutant
2:123b894b49dd
|
52
|
* @{
|
|
Jerome Coutant
2:123b894b49dd
|
53
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
54
|
|
|
Jerome Coutant
2:123b894b49dd
|
55
|
/** @addtogroup STM32469I_Discovery
|
|
Jerome Coutant
2:123b894b49dd
|
56
|
* @{
|
|
Jerome Coutant
2:123b894b49dd
|
57
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
58
|
|
|
Jerome Coutant
2:123b894b49dd
|
59
|
/** @addtogroup STM32469I_Discovery_LOW_LEVEL
|
|
Jerome Coutant
2:123b894b49dd
|
60
|
* @{
|
|
Jerome Coutant
2:123b894b49dd
|
61
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
62
|
|
|
Jerome Coutant
2:123b894b49dd
|
63
|
/** @defgroup STM32469I_Discovery_LOW_LEVEL_Exported_Types STM32469I Discovery LOW LEVEL Exported Types
|
|
Jerome Coutant
2:123b894b49dd
|
64
|
* @{
|
|
Jerome Coutant
2:123b894b49dd
|
65
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
66
|
|
|
Jerome Coutant
2:123b894b49dd
|
67
|
/** @brief Led_TypeDef
|
|
Jerome Coutant
2:123b894b49dd
|
68
|
* STM32469I_Discovery board leds definitions.
|
|
Jerome Coutant
2:123b894b49dd
|
69
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
70
|
typedef enum
|
|
Jerome Coutant
2:123b894b49dd
|
71
|
{
|
|
Jerome Coutant
2:123b894b49dd
|
72
|
DISCO_LED1 = 0,
|
|
Jerome Coutant
2:123b894b49dd
|
73
|
DISCO_LED_GREEN = DISCO_LED1,
|
|
Jerome Coutant
2:123b894b49dd
|
74
|
DISCO_LED2 = 1,
|
|
Jerome Coutant
2:123b894b49dd
|
75
|
DISCO_LED_ORANGE = DISCO_LED2,
|
|
Jerome Coutant
2:123b894b49dd
|
76
|
DISCO_LED3 = 2,
|
|
Jerome Coutant
2:123b894b49dd
|
77
|
DISCO_LED_RED = DISCO_LED3,
|
|
Jerome Coutant
2:123b894b49dd
|
78
|
DISCO_LED4 = 3,
|
|
Jerome Coutant
2:123b894b49dd
|
79
|
DISCO_LED_BLUE = DISCO_LED4
|
|
Jerome Coutant
2:123b894b49dd
|
80
|
|
|
Jerome Coutant
2:123b894b49dd
|
81
|
} Led_TypeDef;
|
|
Jerome Coutant
2:123b894b49dd
|
82
|
|
|
Jerome Coutant
2:123b894b49dd
|
83
|
/** @brief Button_TypeDef
|
|
Jerome Coutant
2:123b894b49dd
|
84
|
* STM32469I_Discovery board Buttons definitions.
|
|
Jerome Coutant
2:123b894b49dd
|
85
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
86
|
typedef enum
|
|
Jerome Coutant
2:123b894b49dd
|
87
|
{
|
|
Jerome Coutant
2:123b894b49dd
|
88
|
BUTTON_WAKEUP = 0
|
|
Jerome Coutant
2:123b894b49dd
|
89
|
} Button_TypeDef;
|
|
Jerome Coutant
2:123b894b49dd
|
90
|
|
|
Jerome Coutant
2:123b894b49dd
|
91
|
#define BUTTON_USER BUTTON_WAKEUP
|
|
Jerome Coutant
2:123b894b49dd
|
92
|
|
|
Jerome Coutant
2:123b894b49dd
|
93
|
/** @brief ButtonMode_TypeDef
|
|
Jerome Coutant
2:123b894b49dd
|
94
|
* STM32469I_Discovery board Buttons Modes definitions.
|
|
Jerome Coutant
2:123b894b49dd
|
95
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
96
|
typedef enum
|
|
Jerome Coutant
2:123b894b49dd
|
97
|
{
|
|
Jerome Coutant
2:123b894b49dd
|
98
|
BUTTON_MODE_GPIO = 0,
|
|
Jerome Coutant
2:123b894b49dd
|
99
|
BUTTON_MODE_EXTI = 1
|
|
Jerome Coutant
2:123b894b49dd
|
100
|
|
|
Jerome Coutant
2:123b894b49dd
|
101
|
} ButtonMode_TypeDef;
|
|
Jerome Coutant
2:123b894b49dd
|
102
|
|
|
Jerome Coutant
2:123b894b49dd
|
103
|
/** @addtogroup Exported_types
|
|
Jerome Coutant
2:123b894b49dd
|
104
|
* @{
|
|
Jerome Coutant
2:123b894b49dd
|
105
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
106
|
typedef enum
|
|
Jerome Coutant
2:123b894b49dd
|
107
|
{
|
|
Jerome Coutant
2:123b894b49dd
|
108
|
PB_SET = 0,
|
|
Jerome Coutant
2:123b894b49dd
|
109
|
PB_RESET = !PB_SET
|
|
Jerome Coutant
2:123b894b49dd
|
110
|
} ButtonValue_TypeDef;
|
|
Jerome Coutant
2:123b894b49dd
|
111
|
|
|
Jerome Coutant
2:123b894b49dd
|
112
|
|
|
Jerome Coutant
2:123b894b49dd
|
113
|
/** @brief DISCO_Status_TypeDef
|
|
Jerome Coutant
2:123b894b49dd
|
114
|
* STM32469I_DISCO board Status return possible values.
|
|
Jerome Coutant
2:123b894b49dd
|
115
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
116
|
typedef enum
|
|
Jerome Coutant
2:123b894b49dd
|
117
|
{
|
|
Jerome Coutant
2:123b894b49dd
|
118
|
DISCO_OK = 0,
|
|
Jerome Coutant
2:123b894b49dd
|
119
|
DISCO_ERROR = 1
|
|
Jerome Coutant
2:123b894b49dd
|
120
|
|
|
Jerome Coutant
2:123b894b49dd
|
121
|
} DISCO_Status_TypeDef;
|
|
Jerome Coutant
2:123b894b49dd
|
122
|
|
|
Jerome Coutant
2:123b894b49dd
|
123
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
124
|
* @}
|
|
Jerome Coutant
2:123b894b49dd
|
125
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
126
|
|
|
Jerome Coutant
2:123b894b49dd
|
127
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
128
|
* @}
|
|
Jerome Coutant
2:123b894b49dd
|
129
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
130
|
|
|
Jerome Coutant
2:123b894b49dd
|
131
|
/** @defgroup STM32469I_Discovery_LOW_LEVEL_Exported_Constants STM32469I Discovery LOW LEVEL Exported Constants
|
|
Jerome Coutant
2:123b894b49dd
|
132
|
* @{
|
|
Jerome Coutant
2:123b894b49dd
|
133
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
134
|
|
|
Jerome Coutant
2:123b894b49dd
|
135
|
|
|
Jerome Coutant
2:123b894b49dd
|
136
|
/** @defgroup STM32469I_Discovery_LOW_LEVEL_LED STM32469I Discovery LOW LEVEL LED
|
|
Jerome Coutant
2:123b894b49dd
|
137
|
* @{
|
|
Jerome Coutant
2:123b894b49dd
|
138
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
139
|
/* Always four leds for all revisions of Discovery boards */
|
|
Jerome Coutant
2:123b894b49dd
|
140
|
#define LEDn ((uint8_t)4)
|
|
Jerome Coutant
2:123b894b49dd
|
141
|
|
|
Jerome Coutant
2:123b894b49dd
|
142
|
|
|
Jerome Coutant
2:123b894b49dd
|
143
|
/* 4 Leds are connected to MCU directly on PG6, PD4, PD5, PK3 */
|
|
Jerome Coutant
2:123b894b49dd
|
144
|
#define LED1_GPIO_PORT ((GPIO_TypeDef*)GPIOG)
|
|
Jerome Coutant
2:123b894b49dd
|
145
|
#define LED2_GPIO_PORT ((GPIO_TypeDef*)GPIOD)
|
|
Jerome Coutant
2:123b894b49dd
|
146
|
#define LED3_GPIO_PORT ((GPIO_TypeDef*)GPIOD)
|
|
Jerome Coutant
2:123b894b49dd
|
147
|
#define LED4_GPIO_PORT ((GPIO_TypeDef*)GPIOK)
|
|
Jerome Coutant
2:123b894b49dd
|
148
|
|
|
Jerome Coutant
2:123b894b49dd
|
149
|
#define LED1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
150
|
#define LED1_GPIO_CLK_DISABLE() __HAL_RCC_GPIOG_CLK_DISABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
151
|
#define LED2_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
152
|
#define LED2_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
153
|
#define LED3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
154
|
#define LED3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
155
|
#define LED4_GPIO_CLK_ENABLE() __HAL_RCC_GPIOK_CLK_ENABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
156
|
#define LED4_GPIO_CLK_DISABLE() __HAL_RCC_GPIOK_CLK_DISABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
157
|
|
|
Jerome Coutant
2:123b894b49dd
|
158
|
#define LED1_PIN ((uint32_t)GPIO_PIN_6)
|
|
Jerome Coutant
2:123b894b49dd
|
159
|
#define LED2_PIN ((uint32_t)GPIO_PIN_4)
|
|
Jerome Coutant
2:123b894b49dd
|
160
|
#define LED3_PIN ((uint32_t)GPIO_PIN_5)
|
|
Jerome Coutant
2:123b894b49dd
|
161
|
#define LED4_PIN ((uint32_t)GPIO_PIN_3)
|
|
Jerome Coutant
2:123b894b49dd
|
162
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
163
|
* @}
|
|
Jerome Coutant
2:123b894b49dd
|
164
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
165
|
|
|
Jerome Coutant
2:123b894b49dd
|
166
|
/** @addtogroup STM32469I_Discovery_LOW_LEVEL_BUTTON STM32469I Discovery LOW LEVEL BUTTON
|
|
Jerome Coutant
2:123b894b49dd
|
167
|
* @{
|
|
Jerome Coutant
2:123b894b49dd
|
168
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
169
|
/* Only one User/Wakeup button */
|
|
Jerome Coutant
2:123b894b49dd
|
170
|
#define BUTTONn ((uint8_t)1)
|
|
Jerome Coutant
2:123b894b49dd
|
171
|
|
|
Jerome Coutant
2:123b894b49dd
|
172
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
173
|
* @brief Wakeup push-button
|
|
Jerome Coutant
2:123b894b49dd
|
174
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
175
|
#define WAKEUP_BUTTON_PIN GPIO_PIN_0
|
|
Jerome Coutant
2:123b894b49dd
|
176
|
#define WAKEUP_BUTTON_GPIO_PORT GPIOA
|
|
Jerome Coutant
2:123b894b49dd
|
177
|
#define WAKEUP_BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
178
|
#define WAKEUP_BUTTON_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
179
|
#define WAKEUP_BUTTON_EXTI_IRQn EXTI0_IRQn
|
|
Jerome Coutant
2:123b894b49dd
|
180
|
|
|
Jerome Coutant
2:123b894b49dd
|
181
|
/* Define the USER button as an alias of the Wakeup button */
|
|
Jerome Coutant
2:123b894b49dd
|
182
|
#define USER_BUTTON_PIN WAKEUP_BUTTON_PIN
|
|
Jerome Coutant
2:123b894b49dd
|
183
|
#define USER_BUTTON_GPIO_PORT WAKEUP_BUTTON_GPIO_PORT
|
|
Jerome Coutant
2:123b894b49dd
|
184
|
#define USER_BUTTON_GPIO_CLK_ENABLE() WAKEUP_BUTTON_GPIO_CLK_ENABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
185
|
#define USER_BUTTON_GPIO_CLK_DISABLE() WAKEUP_BUTTON_GPIO_CLK_DISABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
186
|
#define USER_BUTTON_EXTI_IRQn WAKEUP_BUTTON_EXTI_IRQn
|
|
Jerome Coutant
2:123b894b49dd
|
187
|
|
|
Jerome Coutant
2:123b894b49dd
|
188
|
#define BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
189
|
|
|
Jerome Coutant
2:123b894b49dd
|
190
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
191
|
* @}
|
|
Jerome Coutant
2:123b894b49dd
|
192
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
193
|
|
|
Jerome Coutant
2:123b894b49dd
|
194
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
195
|
* @brief OTG_FS1 OVER_CURRENT and POWER_SWITCH Pins definition
|
|
Jerome Coutant
2:123b894b49dd
|
196
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
197
|
#define AUDIO_INT_PIN GPIO_PIN_7
|
|
Jerome Coutant
2:123b894b49dd
|
198
|
#define AUDIO_INT_PORT GPIOB
|
|
Jerome Coutant
2:123b894b49dd
|
199
|
#define AUDIO_INT_PORT_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
200
|
|
|
Jerome Coutant
2:123b894b49dd
|
201
|
#define OTG_FS1_OVER_CURRENT_PIN GPIO_PIN_7
|
|
Jerome Coutant
2:123b894b49dd
|
202
|
#define OTG_FS1_OVER_CURRENT_PORT GPIOB
|
|
Jerome Coutant
2:123b894b49dd
|
203
|
#define OTG_FS1_OVER_CURRENT_PORT_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
204
|
|
|
Jerome Coutant
2:123b894b49dd
|
205
|
#define OTG_FS1_POWER_SWITCH_PIN GPIO_PIN_2
|
|
Jerome Coutant
2:123b894b49dd
|
206
|
#define OTG_FS1_POWER_SWITCH_PORT GPIOB
|
|
Jerome Coutant
2:123b894b49dd
|
207
|
#define OTG_FS1_POWER_SWITCH_PORT_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
208
|
|
|
Jerome Coutant
2:123b894b49dd
|
209
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
210
|
* @brief SD-detect signal
|
|
Jerome Coutant
2:123b894b49dd
|
211
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
212
|
#define SD_DETECT_PIN ((uint32_t)GPIO_PIN_2)
|
|
Jerome Coutant
2:123b894b49dd
|
213
|
#define SD_DETECT_GPIO_PORT ((GPIO_TypeDef*)GPIOG)
|
|
Jerome Coutant
2:123b894b49dd
|
214
|
#define SD_DETECT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
215
|
#define SD_DETECT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOG_CLK_DISABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
216
|
#define SD_DETECT_EXTI_IRQn EXTI2_IRQn
|
|
Jerome Coutant
2:123b894b49dd
|
217
|
|
|
Jerome Coutant
2:123b894b49dd
|
218
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
219
|
* @brief TS_INT signal from TouchScreen when it is configured in interrupt mode
|
|
Jerome Coutant
2:123b894b49dd
|
220
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
221
|
#define TS_INT_PIN ((uint32_t)GPIO_PIN_5)
|
|
Jerome Coutant
2:123b894b49dd
|
222
|
#define TS_INT_GPIO_PORT ((GPIO_TypeDef*)GPIOJ)
|
|
Jerome Coutant
2:123b894b49dd
|
223
|
#define TS_INT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOJ_CLK_ENABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
224
|
#define TS_INT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOJ_CLK_DISABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
225
|
#define TS_INT_EXTI_IRQn EXTI9_5_IRQn
|
|
Jerome Coutant
2:123b894b49dd
|
226
|
|
|
Jerome Coutant
2:123b894b49dd
|
227
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
228
|
* @brief TouchScreen FT6206 Slave I2C address 1
|
|
Jerome Coutant
2:123b894b49dd
|
229
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
230
|
#define TS_I2C_ADDRESS ((uint16_t)0x54)
|
|
Jerome Coutant
2:123b894b49dd
|
231
|
|
|
Jerome Coutant
2:123b894b49dd
|
232
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
233
|
* @brief TouchScreen FT6336G Slave I2C address 2
|
|
Jerome Coutant
2:123b894b49dd
|
234
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
235
|
#define TS_I2C_ADDRESS_A02 ((uint16_t)0x70)
|
|
Jerome Coutant
2:123b894b49dd
|
236
|
|
|
Jerome Coutant
2:123b894b49dd
|
237
|
|
|
Jerome Coutant
2:123b894b49dd
|
238
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
239
|
* @brief Audio I2C Slave address
|
|
Jerome Coutant
2:123b894b49dd
|
240
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
241
|
#define AUDIO_I2C_ADDRESS ((uint16_t)0x94)
|
|
Jerome Coutant
2:123b894b49dd
|
242
|
|
|
Jerome Coutant
2:123b894b49dd
|
243
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
244
|
* @brief EEPROM I2C Slave address 1
|
|
Jerome Coutant
2:123b894b49dd
|
245
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
246
|
#define EEPROM_I2C_ADDRESS_A01 ((uint16_t)0xA0)
|
|
Jerome Coutant
2:123b894b49dd
|
247
|
|
|
Jerome Coutant
2:123b894b49dd
|
248
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
249
|
* @brief EEPROM I2C Slave address 2
|
|
Jerome Coutant
2:123b894b49dd
|
250
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
251
|
#define EEPROM_I2C_ADDRESS_A02 ((uint16_t)0xA6)
|
|
Jerome Coutant
2:123b894b49dd
|
252
|
|
|
Jerome Coutant
2:123b894b49dd
|
253
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
254
|
* @brief I2C clock speed configuration (in Hz)
|
|
Jerome Coutant
2:123b894b49dd
|
255
|
* WARNING:
|
|
Jerome Coutant
2:123b894b49dd
|
256
|
* Make sure that this define is not already declared in other files
|
|
Jerome Coutant
2:123b894b49dd
|
257
|
* It can be used in parallel by other modules.
|
|
Jerome Coutant
2:123b894b49dd
|
258
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
259
|
#ifndef I2C1_SCL_FREQ_KHZ
|
|
Jerome Coutant
2:123b894b49dd
|
260
|
#define I2C1_SCL_FREQ_KHZ 400000 /*!< f(I2C_SCL) = 400 kHz */
|
|
Jerome Coutant
2:123b894b49dd
|
261
|
#endif /* I2C1_SCL_FREQ_KHZ */
|
|
Jerome Coutant
2:123b894b49dd
|
262
|
|
|
Jerome Coutant
2:123b894b49dd
|
263
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
264
|
* @brief User can use this section to tailor I2C1/I2C1 instance used and associated
|
|
Jerome Coutant
2:123b894b49dd
|
265
|
* resources.
|
|
Jerome Coutant
2:123b894b49dd
|
266
|
* Definition for I2C1 clock resources
|
|
Jerome Coutant
2:123b894b49dd
|
267
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
268
|
#define DISCO_I2C1 I2C1
|
|
Jerome Coutant
2:123b894b49dd
|
269
|
#define DISCO_I2C1_CLK_ENABLE() __HAL_RCC_I2C1_CLK_ENABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
270
|
#define DISCO_DMAx_CLK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
271
|
#define DISCO_I2C1_SCL_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
272
|
|
|
Jerome Coutant
2:123b894b49dd
|
273
|
#define DISCO_I2C1_FORCE_RESET() __HAL_RCC_I2C1_FORCE_RESET()
|
|
Jerome Coutant
2:123b894b49dd
|
274
|
#define DISCO_I2C1_RELEASE_RESET() __HAL_RCC_I2C1_RELEASE_RESET()
|
|
Jerome Coutant
2:123b894b49dd
|
275
|
|
|
Jerome Coutant
2:123b894b49dd
|
276
|
/** @brief Definition for I2C1 Pins
|
|
Jerome Coutant
2:123b894b49dd
|
277
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
278
|
#define DISCO_I2C1_SCL_PIN GPIO_PIN_8 /*!< PB8 */
|
|
Jerome Coutant
2:123b894b49dd
|
279
|
#define DISCO_I2C1_SCL_SDA_GPIO_PORT GPIOB
|
|
Jerome Coutant
2:123b894b49dd
|
280
|
#define DISCO_I2C1_SCL_SDA_AF GPIO_AF4_I2C1
|
|
Jerome Coutant
2:123b894b49dd
|
281
|
#define DISCO_I2C1_SDA_PIN GPIO_PIN_9 /*!< PB9 */
|
|
Jerome Coutant
2:123b894b49dd
|
282
|
|
|
Jerome Coutant
2:123b894b49dd
|
283
|
/** @brief Definition of I2C interrupt requests
|
|
Jerome Coutant
2:123b894b49dd
|
284
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
285
|
#define DISCO_I2C1_EV_IRQn I2C1_EV_IRQn
|
|
Jerome Coutant
2:123b894b49dd
|
286
|
#define DISCO_I2C1_ER_IRQn I2C1_ER_IRQn
|
|
Jerome Coutant
2:123b894b49dd
|
287
|
|
|
Jerome Coutant
2:123b894b49dd
|
288
|
|
|
Jerome Coutant
2:123b894b49dd
|
289
|
|
|
Jerome Coutant
2:123b894b49dd
|
290
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
291
|
* @brief I2C2 clock speed configuration (in Hz)
|
|
Jerome Coutant
2:123b894b49dd
|
292
|
* WARNING:
|
|
Jerome Coutant
2:123b894b49dd
|
293
|
* Make sure that this define is not already declared in other files
|
|
Jerome Coutant
2:123b894b49dd
|
294
|
* It can be used in parallel by other modules.
|
|
Jerome Coutant
2:123b894b49dd
|
295
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
296
|
#ifndef I2C2_SCL_FREQ_KHZ
|
|
Jerome Coutant
2:123b894b49dd
|
297
|
#define I2C2_SCL_FREQ_KHZ 100000 /*!< f(I2C2_SCL) < 100 kHz */
|
|
Jerome Coutant
2:123b894b49dd
|
298
|
#endif /* I2C2_SCL_FREQ_KHZ */
|
|
Jerome Coutant
2:123b894b49dd
|
299
|
|
|
Jerome Coutant
2:123b894b49dd
|
300
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
301
|
* @brief User can use this section to tailor I2C2/I2C2 instance used and associated
|
|
Jerome Coutant
2:123b894b49dd
|
302
|
* resources (audio codec).
|
|
Jerome Coutant
2:123b894b49dd
|
303
|
* Definition for I2C2 clock resources
|
|
Jerome Coutant
2:123b894b49dd
|
304
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
305
|
#define DISCO_I2C2 I2C2
|
|
Jerome Coutant
2:123b894b49dd
|
306
|
#define DISCO_I2C2_CLK_ENABLE() __HAL_RCC_I2C2_CLK_ENABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
307
|
#define DISCO_I2C2_SCL_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOH_CLK_ENABLE()
|
|
Jerome Coutant
2:123b894b49dd
|
308
|
|
|
Jerome Coutant
2:123b894b49dd
|
309
|
#define DISCO_I2C2_FORCE_RESET() __HAL_RCC_I2C2_FORCE_RESET()
|
|
Jerome Coutant
2:123b894b49dd
|
310
|
#define DISCO_I2C2_RELEASE_RESET() __HAL_RCC_I2C2_RELEASE_RESET()
|
|
Jerome Coutant
2:123b894b49dd
|
311
|
|
|
Jerome Coutant
2:123b894b49dd
|
312
|
/** @brief Definition for I2C2 Pins
|
|
Jerome Coutant
2:123b894b49dd
|
313
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
314
|
#define DISCO_I2C2_SCL_PIN GPIO_PIN_4 /*!< PH4 */
|
|
Jerome Coutant
2:123b894b49dd
|
315
|
#define DISCO_I2C2_SCL_SDA_GPIO_PORT GPIOH
|
|
Jerome Coutant
2:123b894b49dd
|
316
|
#define DISCO_I2C2_SCL_SDA_AF GPIO_AF4_I2C2
|
|
Jerome Coutant
2:123b894b49dd
|
317
|
#define DISCO_I2C2_SDA_PIN GPIO_PIN_5 /*!< PH5 */
|
|
Jerome Coutant
2:123b894b49dd
|
318
|
|
|
Jerome Coutant
2:123b894b49dd
|
319
|
/** @brief Definition of I2C2 interrupt requests
|
|
Jerome Coutant
2:123b894b49dd
|
320
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
321
|
#define DISCO_I2C2_EV_IRQn I2C2_EV_IRQn
|
|
Jerome Coutant
2:123b894b49dd
|
322
|
#define DISCO_I2C2_ER_IRQn I2C2_ER_IRQn
|
|
Jerome Coutant
2:123b894b49dd
|
323
|
|
|
Jerome Coutant
2:123b894b49dd
|
324
|
|
|
Jerome Coutant
2:123b894b49dd
|
325
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
326
|
* @}
|
|
Jerome Coutant
2:123b894b49dd
|
327
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
328
|
|
|
Jerome Coutant
2:123b894b49dd
|
329
|
/** @defgroup STM32469I_Discovery_LOW_LEVEL_Exported_Macros STM32469I Discovery LOW LEVEL Exported Macros
|
|
Jerome Coutant
2:123b894b49dd
|
330
|
* @{
|
|
Jerome Coutant
2:123b894b49dd
|
331
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
332
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
333
|
* @}
|
|
Jerome Coutant
2:123b894b49dd
|
334
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
335
|
|
|
Jerome Coutant
2:123b894b49dd
|
336
|
/** @defgroup STM32469I_Discovery_LOW_LEVEL_Exported_Functions STM32469I Discovery LOW LEVEL Exported Functions
|
|
Jerome Coutant
2:123b894b49dd
|
337
|
* @{
|
|
Jerome Coutant
2:123b894b49dd
|
338
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
339
|
uint32_t BSP_GetVersion(void);
|
|
Jerome Coutant
2:123b894b49dd
|
340
|
void BSP_LED_Init(Led_TypeDef Led);
|
|
Jerome Coutant
2:123b894b49dd
|
341
|
void BSP_LED_DeInit(Led_TypeDef Led);
|
|
Jerome Coutant
2:123b894b49dd
|
342
|
void BSP_LED_On(Led_TypeDef Led);
|
|
Jerome Coutant
2:123b894b49dd
|
343
|
void BSP_LED_Off(Led_TypeDef Led);
|
|
Jerome Coutant
2:123b894b49dd
|
344
|
void BSP_LED_Toggle(Led_TypeDef Led);
|
|
Jerome Coutant
2:123b894b49dd
|
345
|
void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode);
|
|
Jerome Coutant
2:123b894b49dd
|
346
|
void BSP_PB_DeInit(Button_TypeDef Button);
|
|
Jerome Coutant
2:123b894b49dd
|
347
|
uint32_t BSP_PB_GetState(Button_TypeDef Button);
|
|
Jerome Coutant
2:123b894b49dd
|
348
|
|
|
Jerome Coutant
2:123b894b49dd
|
349
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
350
|
* @}
|
|
Jerome Coutant
2:123b894b49dd
|
351
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
352
|
|
|
Jerome Coutant
2:123b894b49dd
|
353
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
354
|
* @}
|
|
Jerome Coutant
2:123b894b49dd
|
355
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
356
|
|
|
Jerome Coutant
2:123b894b49dd
|
357
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
358
|
* @}
|
|
Jerome Coutant
2:123b894b49dd
|
359
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
360
|
|
|
Jerome Coutant
2:123b894b49dd
|
361
|
/**
|
|
Jerome Coutant
2:123b894b49dd
|
362
|
* @}
|
|
Jerome Coutant
2:123b894b49dd
|
363
|
*/
|
|
Jerome Coutant
2:123b894b49dd
|
364
|
|
|
Jerome Coutant
2:123b894b49dd
|
365
|
|
|
Jerome Coutant
2:123b894b49dd
|
366
|
#ifdef __cplusplus
|
|
Jerome Coutant
2:123b894b49dd
|
367
|
}
|
|
Jerome Coutant
2:123b894b49dd
|
368
|
#endif
|
|
Jerome Coutant
2:123b894b49dd
|
369
|
|
|
Jerome Coutant
2:123b894b49dd
|
370
|
#endif /* __STM32469I_DISCOVERY_H */
|
|
Jerome Coutant
2:123b894b49dd
|
371
|
|
|
Jerome Coutant
2:123b894b49dd
|
372
|
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
|