stm32f769i_discovery.h
Go to the documentation of this file.
1 
37 /* Define to prevent recursive inclusion -------------------------------------*/
38 #ifndef __STM32F769I_DISCOVERY_H
39 #define __STM32F769I_DISCOVERY_H
40 
41 #ifdef __cplusplus
42  extern "C" {
43 #endif
44 
45 
46  /* Includes ------------------------------------------------------------------*/
47 #include "stm32f7xx_hal.h"
48 
68 #if !defined (USE_STM32F769I_DISCO)
69  #define USE_STM32F769I_DISCO
70 #endif
71 
75 typedef enum
76 {
77  LED1 = 0,
79  LED2 = 1,
81 } Led_TypeDef;
82 
86 typedef enum
87 {
90 
91 #define BUTTON_USER BUTTON_WAKEUP
92 
96 typedef enum
97 {
100 
102 
106 typedef enum
107 {
108  PB_SET = 0,
111 
112 
116 typedef enum
117 {
118  DISCO_OK = 0,
120 
122 
135 /* Always four leds for all revisions of Discovery boards */
136 #define LEDn ((uint8_t)2)
137 
138 
139 /* 2 Leds are connected to MCU directly on PJ13 and PJ5 */
140 #define LED1_GPIO_PORT ((GPIO_TypeDef*)GPIOJ)
141 #define LED2_GPIO_PORT ((GPIO_TypeDef*)GPIOJ)
142 
143 #define LEDx_GPIO_CLK_ENABLE() __HAL_RCC_GPIOJ_CLK_ENABLE()
144 #define LEDx_GPIO_CLK_DISABLE() __HAL_RCC_GPIOJ_CLK_DISABLE()
145 
146 #define LED1_PIN ((uint32_t)GPIO_PIN_13)
147 #define LED2_PIN ((uint32_t)GPIO_PIN_5)
148 
156 /* Only one User/Wakeup button */
157 #define BUTTONn ((uint8_t)1)
158 
162 #define WAKEUP_BUTTON_PIN GPIO_PIN_0
163 #define WAKEUP_BUTTON_GPIO_PORT GPIOA
164 #define WAKEUP_BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
165 #define WAKEUP_BUTTON_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
166 #define WAKEUP_BUTTON_EXTI_IRQn EXTI0_IRQn
167 
168 /* Define the USER button as an alias of the Wakeup button */
169 #define USER_BUTTON_PIN WAKEUP_BUTTON_PIN
170 #define USER_BUTTON_GPIO_PORT WAKEUP_BUTTON_GPIO_PORT
171 #define USER_BUTTON_GPIO_CLK_ENABLE() WAKEUP_BUTTON_GPIO_CLK_ENABLE()
172 #define USER_BUTTON_GPIO_CLK_DISABLE() WAKEUP_BUTTON_GPIO_CLK_DISABLE()
173 #define USER_BUTTON_EXTI_IRQn WAKEUP_BUTTON_EXTI_IRQn
174 
175 #define BUTTON_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
176 
184 #define OTG_HS_OVER_CURRENT_PIN GPIO_PIN_4
185 #define OTG_HS_OVER_CURRENT_PORT GPIOD
186 #define OTG_HS_OVER_CURRENT_PORT_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE()
187 
191 #define SD_DETECT_PIN ((uint32_t)GPIO_PIN_15)
192 #define SD_DETECT_GPIO_PORT ((GPIO_TypeDef*)GPIOI)
193 #define SD_DETECT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOI_CLK_ENABLE()
194 #define SD_DETECT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOI_CLK_DISABLE()
195 #define SD_DETECT_EXTI_IRQn EXTI15_10_IRQn
196 
200 #define TS_INT_PIN ((uint32_t)GPIO_PIN_13)
201 #define TS_INT_GPIO_PORT ((GPIO_TypeDef*)GPIOI)
202 #define TS_INT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOI_CLK_ENABLE()
203 #define TS_INT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOI_CLK_DISABLE()
204 #define TS_INT_EXTI_IRQn EXTI15_10_IRQn
205 
209 #define TS_I2C_ADDRESS ((uint16_t)0x54)
210 
214 #define TS_I2C_ADDRESS_A02 ((uint16_t)0x70)
215 
219 #define LCD_DSI_ADDRESS TS_I2C_ADDRESS
220 
224 #define LCD_DSI_ADDRESS_A02 TS_I2C_ADDRESS_A02
225 
229 #define AUDIO_I2C_ADDRESS ((uint16_t)0x34)
230 
234 #define EEPROM_I2C_ADDRESS_A01 ((uint16_t)0xA0)
235 
239 #define EEPROM_I2C_ADDRESS_A02 ((uint16_t)0xA6)
240 
246 #define DISCOVERY_AUDIO_I2Cx I2C4
247 #define DISCOVERY_AUDIO_I2Cx_CLK_ENABLE() __HAL_RCC_I2C4_CLK_ENABLE()
248 #define DISCOVERY_AUDIO_I2Cx_SCL_GPIO_CLK_ENABLE() __HAL_RCC_GPIOD_CLK_ENABLE()
249 #define DISCOVERY_AUDIO_I2Cx_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
250 
251 #define DISCOVERY_AUDIO_I2Cx_FORCE_RESET() __HAL_RCC_I2C4_FORCE_RESET()
252 #define DISCOVERY_AUDIO_I2Cx_RELEASE_RESET() __HAL_RCC_I2C4_RELEASE_RESET()
253 
256 #define DISCOVERY_AUDIO_I2Cx_SCL_PIN GPIO_PIN_12
257 #define DISCOVERY_AUDIO_I2Cx_SCL_AF GPIO_AF4_I2C4
258 #define DISCOVERY_AUDIO_I2Cx_SCL_GPIO_PORT GPIOD
259 #define DISCOVERY_AUDIO_I2Cx_SDA_PIN GPIO_PIN_7
260 #define DISCOVERY_AUDIO_I2Cx_SDA_AF GPIO_AF11_I2C4
261 #define DISCOVERY_AUDIO_I2Cx_SDA_GPIO_PORT GPIOB
262 
264 #define DISCOVERY_AUDIO_I2Cx_EV_IRQn I2C4_EV_IRQn
265 #define DISCOVERY_AUDIO_I2Cx_ER_IRQn I2C4_ER_IRQn
266 
272 #define DISCOVERY_EXT_I2Cx I2C1
273 #define DISCOVERY_EXT_I2Cx_CLK_ENABLE() __HAL_RCC_I2C1_CLK_ENABLE()
274 #define DISCOVERY_DMAx_CLK_ENABLE() __HAL_RCC_DMA1_CLK_ENABLE()
275 #define DISCOVERY_EXT_I2Cx_SCL_SDA_GPIO_CLK_ENABLE() __HAL_RCC_GPIOB_CLK_ENABLE()
276 
277 #define DISCOVERY_EXT_I2Cx_FORCE_RESET() __HAL_RCC_I2C1_FORCE_RESET()
278 #define DISCOVERY_EXT_I2Cx_RELEASE_RESET() __HAL_RCC_I2C1_RELEASE_RESET()
279 
282 #define DISCOVERY_EXT_I2Cx_SCL_PIN GPIO_PIN_8
283 #define DISCOVERY_EXT_I2Cx_SCL_SDA_GPIO_PORT GPIOB
284 #define DISCOVERY_EXT_I2Cx_SCL_SDA_AF GPIO_AF4_I2C1
285 #define DISCOVERY_EXT_I2Cx_SDA_PIN GPIO_PIN_9
289 #define DISCOVERY_EXT_I2Cx_EV_IRQn I2C1_EV_IRQn
290 #define DISCOVERY_EXT_I2Cx_ER_IRQn I2C1_ER_IRQn
291 
292 /* I2C TIMING Register define when I2C clock source is SYSCLK */
293 /* I2C TIMING is calculated from APB1 source clock = 50 MHz */
294 /* Due to the big MOFSET capacity for adapting the camera level the rising time is very large (>1us) */
295 /* 0x40912732 takes in account the big rising and aims a clock of 100khz */
296 #ifndef DISCOVERY_I2Cx_TIMING
297 #define DISCOVERY_I2Cx_TIMING ((uint32_t)0x40912732)
298 #endif /* DISCOVERY_I2Cx_TIMING */
299 
300 
315 uint32_t BSP_GetVersion(void);
316 void BSP_LED_Init(Led_TypeDef Led);
317 void BSP_LED_DeInit(Led_TypeDef Led);
318 void BSP_LED_On(Led_TypeDef Led);
319 void BSP_LED_Off(Led_TypeDef Led);
320 void BSP_LED_Toggle(Led_TypeDef Led);
321 void BSP_PB_Init(Button_TypeDef Button, ButtonMode_TypeDef Button_Mode);
322 void BSP_PB_DeInit(Button_TypeDef Button);
323 uint32_t BSP_PB_GetState(Button_TypeDef Button);
324 
346 #ifdef __cplusplus
347 }
348 #endif
349 
350 #endif /* __STM32F769I_DISCOVERY_H */
351 
352 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
BUTTON_MODE_GPIO
@ BUTTON_MODE_GPIO
Definition: stm32f769i_discovery.h:98
ButtonValue_TypeDef
ButtonValue_TypeDef
Definition: stm32f769i_discovery.h:106
BSP_PB_GetState
uint32_t BSP_PB_GetState(Button_TypeDef Button)
Returns the selected Button state.
Definition: stm32f4_discovery.c:287
BSP_LED_On
void BSP_LED_On(Led_TypeDef Led)
Turns selected LED On.
Definition: stm32f4_discovery.c:197
Button_TypeDef
Button_TypeDef
Button_TypeDef STM32F769I_DISCOVERY board Buttons definitions.
Definition: stm32f769i_discovery.h:86
Led_TypeDef
Led_TypeDef
Led_TypeDef STM32F769I_DISCOVERY board leds definitions.
Definition: stm32f769i_discovery.h:75
BUTTON_MODE_EXTI
@ BUTTON_MODE_EXTI
Definition: stm32f769i_discovery.h:99
LED2
@ LED2
Definition: stm32f769i_discovery.h:79
BSP_GetVersion
uint32_t BSP_GetVersion(void)
This method returns the STM32F4 DISCO BSP Driver revision.
Definition: stm32f4_discovery.c:156
ButtonMode_TypeDef
ButtonMode_TypeDef
Definition: stm32f4_discovery.h:76
BSP_LED_DeInit
void BSP_LED_DeInit(Led_TypeDef Led)
DeInit LEDs.
Definition: stm32469i_discovery.c:232
LED_RED
@ LED_RED
Definition: stm32f769i_discovery.h:78
DISCO_Status_TypeDef
DISCO_Status_TypeDef
DISCO_Status_TypeDef STM32F769I_DISCO board Status return possible values.
Definition: stm32f769i_discovery.h:116
LED1
@ LED1
Definition: stm32f769i_discovery.h:77
PB_SET
@ PB_SET
Definition: stm32f769i_discovery.h:108
BSP_PB_DeInit
void BSP_PB_DeInit(Button_TypeDef Button)
Push Button DeInit.
Definition: stm32469i_discovery.c:354
Button_TypeDef
Button_TypeDef
Definition: stm32f4_discovery.h:71
LED_GREEN
@ LED_GREEN
Definition: stm32f769i_discovery.h:80
ButtonMode_TypeDef
ButtonMode_TypeDef
ButtonMode_TypeDef STM32F769I_DISCOVERY board Buttons Modes definitions.
Definition: stm32f769i_discovery.h:96
Led_TypeDef
Led_TypeDef
Definition: stm32f4_discovery.h:63
DISCO_OK
@ DISCO_OK
Definition: stm32f769i_discovery.h:118
BSP_LED_Toggle
void BSP_LED_Toggle(Led_TypeDef Led)
Toggles the selected LED.
Definition: stm32f4_discovery.c:225
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
PB_RESET
@ PB_RESET
Definition: stm32f769i_discovery.h:109
BSP_LED_Init
void BSP_LED_Init(Led_TypeDef Led)
Configures LED GPIO.
Definition: stm32f4_discovery.c:170
DISCO_ERROR
@ DISCO_ERROR
Definition: stm32f769i_discovery.h:119
BUTTON_WAKEUP
@ BUTTON_WAKEUP
Definition: stm32f769i_discovery.h:88
BSP_LED_Off
void BSP_LED_Off(Led_TypeDef Led)
Turns selected LED Off.
Definition: stm32f4_discovery.c:211
stm32f7xx_hal.h
This file contains all the functions prototypes for the HAL module driver.


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