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