Go to the documentation of this file.
25 #ifndef STM32H747I_DISCO_H
26 #define STM32H747I_DISCO_H
36 #if (USE_BSP_COM_FEATURE > 0)
84 #if (USE_BSP_COM_FEATURE > 0)
110 }COM_HwFlowCtlTypeDef;
117 }COM_WordLengthTypeDef;
122 COM_WordLengthTypeDef WordLength;
123 COM_StopBitsTypeDef StopBits;
124 COM_ParityTypeDef Parity;
125 COM_HwFlowCtlTypeDef HwFlowCtl;
128 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
170 #if !defined (USE_STM32H747I_DISCO)
171 #define USE_STM32H747I_DISCO
176 #define STM32H747I_DISCO_BSP_VERSION_MAIN (0x03)
177 #define STM32H747I_DISCO_BSP_VERSION_SUB1 (0x01)
178 #define STM32H747I_DISCO_BSP_VERSION_SUB2 (0x00)
179 #define STM32H747I_DISCO_BSP_VERSION_RC (0x00)
180 #define STM32H747I_DISCO_BSP_VERSION ((STM32H747I_DISCO_BSP_VERSION_MAIN << 24)\
181 |(STM32H747I_DISCO_BSP_VERSION_SUB1 << 16)\
182 |(STM32H747I_DISCO_BSP_VERSION_SUB2 << 8 )\
183 |(STM32H747I_DISCO_BSP_VERSION_RC))
184 #define STM32H747I_DISCO_BSP_BOARD_NAME "STM32H747I-DISCO";
185 #define STM32H747I_DISCO_BSP_BOARD_ID "MB12481D";
190 #define LED1_GPIO_PORT GPIOI
191 #define LED1_PIN GPIO_PIN_12
193 #define LED2_GPIO_PORT GPIOI
194 #define LED2_PIN GPIO_PIN_13
196 #define LED3_GPIO_PORT GPIOI
197 #define LED3_PIN GPIO_PIN_14
199 #define LED4_GPIO_PORT GPIOI
200 #define LED4_PIN GPIO_PIN_15
202 #define LEDx_GPIO_CLK_ENABLE() __HAL_RCC_GPIOI_CLK_ENABLE()
203 #define LEDx_GPIO_CLK_DISABLE() __HAL_RCC_GPIOI_CLK_DISABLE()
212 #define BUTTON_RELEASED 0U
213 #define BUTTON_PRESSED 1U
217 #define BUTTON_WAKEUP_PIN GPIO_PIN_13
218 #define BUTTON_WAKEUP_GPIO_PORT GPIOC
219 #define BUTTON_WAKEUP_GPIO_CLK_ENABLE() __HAL_RCC_GPIOC_CLK_ENABLE()
220 #define BUTTON_WAKEUP_GPIO_CLK_DISABLE() __HAL_RCC_GPIOC_CLK_DISABLE()
221 #define BUTTON_WAKEUP_EXTI_IRQn EXTI15_10_IRQn
222 #define BUTTON_WAKEUP_EXTI_LINE EXTI_LINE_13
231 #if (USE_BSP_COM_FEATURE > 0)
235 #define COM1_UART USART1
236 #define COM1_CLK_ENABLE() __HAL_RCC_USART1_CLK_ENABLE()
237 #define COM1_CLK_DISABLE() __HAL_RCC_USART1_CLK_DISABLE()
239 #define COM1_TX_PIN GPIO_PIN_9
240 #define COM1_TX_GPIO_PORT GPIOA
241 #define COM1_TX_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
242 #define COM1_TX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
243 #define COM1_TX_AF GPIO_AF7_USART1
245 #define COM1_RX_PIN GPIO_PIN_10
246 #define COM1_RX_GPIO_PORT GPIOA
247 #define COM1_RX_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
248 #define COM1_RX_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
249 #define COM1_RX_AF GPIO_AF7_USART1
250 #define COM_POLL_TIMEOUT 1000
252 #define MX_UART_InitTypeDef COM_InitTypeDef
261 #define JOY_KEY_NUMBER 5U
263 #define JOY1_SEL_PIN GPIO_PIN_2
264 #define JOY1_SEL_GPIO_PORT GPIOK
265 #define JOY1_SEL_GPIO_CLK_ENABLE() __HAL_RCC_GPIOK_CLK_ENABLE()
266 #define JOY1_SEL_GPIO_CLK_DISABLE() __HAL_RCC_GPIOK_CLK_DISABLE()
267 #define JOY1_SEL_EXTI_IRQn EXTI2_IRQn
268 #define JOY1_SEL_EXTI_LINE EXTI_LINE_2
270 #define JOY1_DOWN_PIN GPIO_PIN_3
271 #define JOY1_DOWN_GPIO_PORT GPIOK
272 #define JOY1_DOWN_GPIO_CLK_ENABLE() __HAL_RCC_GPIOK_CLK_ENABLE()
273 #define JOY1_DOWN_GPIO_CLK_DISABLE() __HAL_RCC_GPIOK_CLK_DISABLE()
274 #define JOY1_DOWN_EXTI_IRQn EXTI3_IRQn
275 #define JOY1_DOWN_EXTI_LINE EXTI_LINE_3
277 #define JOY1_LEFT_PIN GPIO_PIN_4
278 #define JOY1_LEFT_GPIO_PORT GPIOK
279 #define JOY1_LEFT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOK_CLK_ENABLE()
280 #define JOY1_LEFT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOK_CLK_DISABLE()
281 #define JOY1_LEFT_EXTI_IRQn EXTI4_IRQn
282 #define JOY1_LEFT_EXTI_LINE EXTI_LINE_4
284 #define JOY1_RIGHT_PIN GPIO_PIN_5
285 #define JOY1_RIGHT_GPIO_PORT GPIOK
286 #define JOY1_RIGHT_GPIO_CLK_ENABLE() __HAL_RCC_GPIOK_CLK_ENABLE()
287 #define JOY1_RIGHT_GPIO_CLK_DISABLE() __HAL_RCC_GPIOK_CLK_DISABLE()
288 #define JOY1_RIGHT_EXTI_IRQn EXTI9_5_IRQn
289 #define JOY1_RIGHT_EXTI_LINE EXTI_LINE_5
291 #define JOY1_UP_PIN GPIO_PIN_6
292 #define JOY1_UP_GPIO_PORT GPIOK
293 #define JOY1_UP_GPIO_CLK_ENABLE() __HAL_RCC_GPIOK_CLK_ENABLE()
294 #define JOY1_UP_GPIO_CLK_DISABLE() __HAL_RCC_GPIOK_CLK_DISABLE()
295 #define JOY1_UP_EXTI_IRQn EXTI9_5_IRQn
296 #define JOY1_UP_EXTI_LINE EXTI_LINE_6
333 #if (USE_BSP_COM_FEATURE > 0)
334 int32_t BSP_COM_Init(COM_TypeDef COM, COM_InitTypeDef *COM_Init);
335 int32_t BSP_COM_DeInit(COM_TypeDef COM);
336 #if( USE_COM_LOG > 0)
337 int32_t BSP_COM_SelectLogPort (COM_TypeDef COM);
340 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
341 int32_t BSP_COM_RegisterDefaultMspCallbacks(COM_TypeDef COM);
342 int32_t BSP_COM_RegisterMspCallbacks(COM_TypeDef COM, BSP_COM_Cb_t *Callback);
USART_TypeDef * COM_USART[]
HAL_StatusTypeDef
HAL Status structures definition
void BSP_LED_DeInit(Led_TypeDef Led)
DeInit LEDs.
Universal Synchronous Asynchronous Receiver Transmitter.
const uint8_t * BSP_GetBoardID(void)
This method returns the board ID.
EXTI_HandleTypeDef hpb_exti[]
__weak void BSP_JOY_Callback(JOY_TypeDef JOY, uint32_t JoyPin)
BSP Joystick Callback.
#define UART_WORDLENGTH_7B
UART handle Structure definition.
EXTI Handle structure definition.
#define UART_WORDLENGTH_9B
__weak void BSP_PB_Callback(Button_TypeDef Button)
BSP Push Button callback.
void BSP_PB_IRQHandler(Button_TypeDef Button)
This function handles Push-Button interrupt requests.
void BSP_LED_Off(Led_TypeDef Led)
Turns selected LED Off.
#define UART_HWCONTROL_NONE
uint32_t BSP_GetVersion(void)
This method returns the STM32F4 DISCO BSP Driver revision.
void BSP_LED_On(Led_TypeDef Led)
Turns selected LED On.
#define UART_HWCONTROL_CTS
#define UART_HWCONTROL_RTS_CTS
#define UART_WORDLENGTH_8B
int32_t BSP_LED_GetState(Led_TypeDef Led)
Get the selected LED state.
int32_t BSP_JOY_Init(JOY_TypeDef JOY, JOYMode_TypeDef JoyMode, JOYPin_TypeDef JoyPins)
Configures joystick GPIO and EXTI modes.
int32_t BSP_JOY_DeInit(JOY_TypeDef JOY, JOYPin_TypeDef JoyPins)
DeInit joystick GPIOs.
#define UART_HWCONTROL_RTS
void BSP_PB_DeInit(Button_TypeDef Button)
Push Button DeInit.
void BSP_LED_Toggle(Led_TypeDef Led)
Toggles the selected LED.
const uint8_t * BSP_GetBoardName(void)
This method returns the board name.
void BSP_JOY_IRQHandler(JOY_TypeDef JOY, JOYPin_TypeDef JoyPin)
This function handles JOY keys interrupt request.
void BSP_LED_Init(Led_TypeDef Led)
Configures LED GPIO.
UART_HandleTypeDef hcom_uart[]
int32_t BSP_JOY_GetState(JOY_TypeDef JOY, uint32_t JoyPin)
Returns the current joystick status.