stm32469i_discovery.h
Go to the documentation of this file.
1 
37 /* Define to prevent recursive inclusion -------------------------------------*/
38 #ifndef __STM32469I_DISCOVERY_H
39 #define __STM32469I_DISCOVERY_H
40 
41 #ifdef __cplusplus
42  extern "C" {
43 #endif
44 
45 
46  /* Includes ------------------------------------------------------------------*/
47 #include "stm32f4xx_hal.h"
48 
68 typedef enum
69 {
70  LED1 = 0,
72  LED2 = 1,
74  LED3 = 2,
76  LED4 = 3,
78 
79 } Led_TypeDef;
80 
84 typedef enum
85 {
88 
89 #define BUTTON_USER BUTTON_WAKEUP
90 
94 typedef enum
95 {
98 
100 
104 typedef enum
105 {
106  PB_SET = 0,
109 
110 
114 typedef enum
115 {
116  DISCO_OK = 0,
118 
120 
137 /* Always four leds for all revisions of Discovery boards */
138 #define LEDn ((uint8_t)4)
139 
140 
141 /* 4 Leds are connected to MCU directly on PG6, PD4, PD5, PK3 */
142 #define LED1_GPIO_PORT ((GPIO_TypeDef*)GPIOG)
143 #define LED2_GPIO_PORT ((GPIO_TypeDef*)GPIOD)
144 #define LED3_GPIO_PORT ((GPIO_TypeDef*)GPIOD)
145 #define LED4_GPIO_PORT ((GPIO_TypeDef*)GPIOK)
146 
147 #define LED1_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE()
148 #define LED1_GPIO_CLK_DISABLE() __HAL_RCC_GPIOG_CLK_DISABLE()
149 #define LED2_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE()
150 #define LED2_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE()
151 #define LED3_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE()
152 #define LED3_GPIO_CLK_DISABLE() __HAL_RCC_GPIOD_CLK_DISABLE()
153 #define LED4_GPIO_CLK_ENABLE() __HAL_RCC_GPIOK_CLK_ENABLE()
154 #define LED4_GPIO_CLK_DISABLE() __HAL_RCC_GPIOK_CLK_DISABLE()
155 
156 #define LED1_PIN ((uint32_t)GPIO_PIN_6)
157 #define LED2_PIN ((uint32_t)GPIO_PIN_4)
158 #define LED3_PIN ((uint32_t)GPIO_PIN_5)
159 #define LED4_PIN ((uint32_t)GPIO_PIN_3)
160 
167 /* Only one User/Wakeup button */
168 #define BUTTONn ((uint8_t)1)
169 
173 #define WAKEUP_BUTTON_PIN GPIO_PIN_0
174 #define WAKEUP_BUTTON_GPIO_PORT GPIOA
175 #define WAKEUP_BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
176 #define WAKEUP_BUTTON_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
177 #define WAKEUP_BUTTON_EXTI_IRQn EXTI0_IRQn
178 
179 /* Define the USER button as an alias of the Wakeup button */
180 #define USER_BUTTON_PIN WAKEUP_BUTTON_PIN
181 #define USER_BUTTON_GPIO_PORT WAKEUP_BUTTON_GPIO_PORT
182 #define USER_BUTTON_GPIO_CLK_ENABLE() WAKEUP_BUTTON_GPIO_CLK_ENABLE()
183 #define USER_BUTTON_GPIO_CLK_DISABLE() WAKEUP_BUTTON_GPIO_CLK_DISABLE()
184 #define USER_BUTTON_EXTI_IRQn WAKEUP_BUTTON_EXTI_IRQn
185 
186 #define BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
187 
195 #define AUDIO_INT_PIN GPIO_PIN_7
196 #define AUDIO_INT_PORT GPIOB
197 #define AUDIO_INT_PORT_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
198 
199 #define OTG_FS1_OVER_CURRENT_PIN GPIO_PIN_7
200 #define OTG_FS1_OVER_CURRENT_PORT GPIOB
201 #define OTG_FS1_OVER_CURRENT_PORT_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
202 
203 #define OTG_FS1_POWER_SWITCH_PIN GPIO_PIN_2
204 #define OTG_FS1_POWER_SWITCH_PORT GPIOB
205 #define OTG_FS1_POWER_SWITCH_PORT_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
206 
210 #define SD_DETECT_PIN ((uint32_t)GPIO_PIN_2)
211 #define SD_DETECT_GPIO_PORT ((GPIO_TypeDef*)GPIOG)
212 #define SD_DETECT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOG_CLK_ENABLE()
213 #define SD_DETECT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOG_CLK_DISABLE()
214 #define SD_DETECT_EXTI_IRQn EXTI2_IRQn
215 
219 #define TS_INT_PIN ((uint32_t)GPIO_PIN_5)
220 #define TS_INT_GPIO_PORT ((GPIO_TypeDef*)GPIOJ)
221 #define TS_INT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOJ_CLK_ENABLE()
222 #define TS_INT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOJ_CLK_DISABLE()
223 #define TS_INT_EXTI_IRQn EXTI9_5_IRQn
224 
228 #define TS_I2C_ADDRESS ((uint16_t)0x54)
229 
233 #define TS_I2C_ADDRESS_A02 ((uint16_t)0x70)
234 
235 
239 #define AUDIO_I2C_ADDRESS ((uint16_t)0x94)
240 
244 #define EEPROM_I2C_ADDRESS_A01 ((uint16_t)0xA0)
245 
249 #define EEPROM_I2C_ADDRESS_A02 ((uint16_t)0xA6)
250 
257 #ifndef I2C1_SCL_FREQ_KHZ
258 #define I2C1_SCL_FREQ_KHZ 400000
259 #endif /* I2C1_SCL_FREQ_KHZ */
260 
266 #define DISCO_I2C1 I2C1
267 #define DISCO_I2C1_CLK_ENABLE() __HAL_RCC_I2C1_CLK_ENABLE()
268 #define DISCO_DMAx_CLK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE()
269 #define DISCO_I2C1_SCL_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
270 
271 #define DISCO_I2C1_FORCE_RESET() __HAL_RCC_I2C1_FORCE_RESET()
272 #define DISCO_I2C1_RELEASE_RESET() __HAL_RCC_I2C1_RELEASE_RESET()
273 
276 #define DISCO_I2C1_SCL_PIN GPIO_PIN_8
277 #define DISCO_I2C1_SCL_SDA_GPIO_PORT GPIOB
278 #define DISCO_I2C1_SCL_SDA_AF GPIO_AF4_I2C1
279 #define DISCO_I2C1_SDA_PIN GPIO_PIN_9
283 #define DISCO_I2C1_EV_IRQn I2C1_EV_IRQn
284 #define DISCO_I2C1_ER_IRQn I2C1_ER_IRQn
285 
286 
287 
294 #ifndef I2C2_SCL_FREQ_KHZ
295 #define I2C2_SCL_FREQ_KHZ 100000
296 #endif /* I2C2_SCL_FREQ_KHZ */
297 
303 #define DISCO_I2C2 I2C2
304 #define DISCO_I2C2_CLK_ENABLE() __HAL_RCC_I2C2_CLK_ENABLE()
305 #define DISCO_I2C2_SCL_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOH_CLK_ENABLE()
306 
307 #define DISCO_I2C2_FORCE_RESET() __HAL_RCC_I2C2_FORCE_RESET()
308 #define DISCO_I2C2_RELEASE_RESET() __HAL_RCC_I2C2_RELEASE_RESET()
309 
312 #define DISCO_I2C2_SCL_PIN GPIO_PIN_4
313 #define DISCO_I2C2_SCL_SDA_GPIO_PORT GPIOH
314 #define DISCO_I2C2_SCL_SDA_AF GPIO_AF4_I2C2
315 #define DISCO_I2C2_SDA_PIN GPIO_PIN_5
319 #define DISCO_I2C2_EV_IRQn I2C2_EV_IRQn
320 #define DISCO_I2C2_ER_IRQn I2C2_ER_IRQn
321 
322 
337 uint32_t BSP_GetVersion(void);
338 void BSP_LED_Init(Led_TypeDef Led);
339 void BSP_LED_DeInit(Led_TypeDef Led);
340 void BSP_LED_On(Led_TypeDef Led);
341 void BSP_LED_Off(Led_TypeDef Led);
342 void BSP_LED_Toggle(Led_TypeDef Led);
343 void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode);
344 void BSP_PB_DeInit(Button_TypeDef Button);
345 uint32_t BSP_PB_GetState(Button_TypeDef Button);
346 
364 #ifdef __cplusplus
365 }
366 #endif
367 
368 #endif /* __STM32469I_DISCOVERY_H */
369 
370 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
BSP_PB_Init
void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode)
Configures Button GPIO and EXTI Line.
Definition: stm32f4_discovery.c:248
BSP_GetVersion
uint32_t BSP_GetVersion(void)
This method returns the STM32F4 DISCO BSP Driver revision.
Definition: stm32f4_discovery.c:156
BSP_LED_DeInit
void BSP_LED_DeInit(Led_TypeDef Led)
DeInit LEDs.
Definition: stm32469i_discovery.c:232
BUTTON_MODE_GPIO
@ BUTTON_MODE_GPIO
Definition: stm32469i_discovery.h:96
LED4
@ LED4
Definition: stm32469i_discovery.h:76
LED_ORANGE
@ LED_ORANGE
Definition: stm32469i_discovery.h:73
ButtonValue_TypeDef
ButtonValue_TypeDef
Definition: stm32469i_discovery.h:104
ButtonMode_TypeDef
ButtonMode_TypeDef
ButtonMode_TypeDef STM32469I_Discovery board Buttons Modes definitions.
Definition: stm32469i_discovery.h:94
Led_TypeDef
Led_TypeDef
Led_TypeDef STM32469I_Discovery board leds definitions.
Definition: stm32469i_discovery.h:68
BSP_LED_Off
void BSP_LED_Off(Led_TypeDef Led)
Turns selected LED Off.
Definition: stm32f4_discovery.c:211
BUTTON_MODE_EXTI
@ BUTTON_MODE_EXTI
Definition: stm32469i_discovery.h:97
LED2
@ LED2
Definition: stm32469i_discovery.h:72
ButtonMode_TypeDef
ButtonMode_TypeDef
Definition: stm32f4_discovery.h:76
BSP_LED_Toggle
void BSP_LED_Toggle(Led_TypeDef Led)
Toggles the selected LED.
Definition: stm32f4_discovery.c:225
BSP_PB_GetState
uint32_t BSP_PB_GetState(Button_TypeDef Button)
Returns the selected Button state.
Definition: stm32f4_discovery.c:287
LED_RED
@ LED_RED
Definition: stm32469i_discovery.h:75
Button_TypeDef
Button_TypeDef
Button_TypeDef STM32469I_Discovery board Buttons definitions.
Definition: stm32469i_discovery.h:84
DISCO_Status_TypeDef
DISCO_Status_TypeDef
DISCO_Status_TypeDef STM32469I_DISCO board Status return possible values.
Definition: stm32469i_discovery.h:114
LED1
@ LED1
Definition: stm32469i_discovery.h:70
PB_SET
@ PB_SET
Definition: stm32469i_discovery.h:106
BSP_LED_On
void BSP_LED_On(Led_TypeDef Led)
Turns selected LED On.
Definition: stm32f4_discovery.c:197
LED3
@ LED3
Definition: stm32469i_discovery.h:74
Button_TypeDef
Button_TypeDef
Definition: stm32f4_discovery.h:71
BSP_PB_DeInit
void BSP_PB_DeInit(Button_TypeDef Button)
Push Button DeInit.
Definition: stm32469i_discovery.c:354
LED_GREEN
@ LED_GREEN
Definition: stm32469i_discovery.h:71
Led_TypeDef
Led_TypeDef
Definition: stm32f4_discovery.h:63
DISCO_OK
@ DISCO_OK
Definition: stm32469i_discovery.h:116
LED_BLUE
@ LED_BLUE
Definition: stm32469i_discovery.h:77
PB_RESET
@ PB_RESET
Definition: stm32469i_discovery.h:107
BSP_LED_Init
void BSP_LED_Init(Led_TypeDef Led)
Configures LED GPIO.
Definition: stm32f4_discovery.c:170
DISCO_ERROR
@ DISCO_ERROR
Definition: stm32469i_discovery.h:117
BUTTON_WAKEUP
@ BUTTON_WAKEUP
Definition: stm32469i_discovery.h:86


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:51