1 /**
2   ******************************************************************************
3   * @file    board.h
4   * @author  MCD Application Team
5   * @brief   board header file for stm32h573_dk.
6   ******************************************************************************
7   * @attention
8   *
9   * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
10   * All rights reserved.</center></h2>
11   *
12   * This software component is licensed by ST under BSD 3-Clause license,
13   * the "License"; You may not use this file except in compliance with the
14   * License. You may obtain a copy of the License at:
15   *                        opensource.org/licenses/BSD-3-Clause
16   *
17   ******************************************************************************
18   */
19 #ifndef __BOARD_H__
20 #define __BOARD_H__
21 /* config for usart */
22 
23 #if 0
24 #define COM_INSTANCE                           USART3
25 #define COM_CLK_ENABLE()                       __HAL_RCC_USART3_CLK_ENABLE()
26 #define COM_CLK_DISABLE()                      __HAL_RCC_USART3_CLK_DISABLE()
27 #define COM_TX_GPIO_PORT                       GPIOD
28 #define COM_TX_GPIO_CLK_ENABLE()               __HAL_RCC_GPIOD_CLK_ENABLE()
29 #define COM_TX_PIN                             GPIO_PIN_8
30 #define COM_TX_AF                              GPIO_AF7_USART3
31 
32 #define COM_RX_GPIO_PORT                       GPIOD
33 #define COM_RX_GPIO_CLK_ENABLE()               __HAL_RCC_GPIOD_CLK_ENABLE()
34 #define COM_RX_PIN                             GPIO_PIN_9
35 #define COM_RX_AF                              GPIO_AF7_USART3
36 #else
37 #define COM_INSTANCE                           USART1
38 #define COM_CLK_ENABLE()                       __HAL_RCC_USART1_CLK_ENABLE()
39 #define COM_CLK_DISABLE()                      __HAL_RCC_USART1_CLK_DISABLE()
40 #define COM_TX_GPIO_PORT                       GPIOA
41 #define COM_TX_GPIO_CLK_ENABLE()               __HAL_RCC_GPIOA_CLK_ENABLE()
42 #define COM_TX_PIN                             GPIO_PIN_9
43 #define COM_TX_AF                              GPIO_AF7_USART1
44 
45 #define COM_RX_GPIO_PORT                       GPIOA
46 #define COM_RX_GPIO_CLK_ENABLE()               __HAL_RCC_GPIOA_CLK_ENABLE()
47 #define COM_RX_PIN                             GPIO_PIN_10
48 #define COM_RX_AF                              GPIO_AF7_USART1
49 
50 #endif
51 /* config for flash driver */
52 #define FLASH0_SECTOR_SIZE	0x2000
53 #define FLASH0_PAGE_SIZE 0x2000
54 #define FLASH0_PROG_UNIT 0x10
55 #define FLASH0_ERASED_VAL 0xff
56 #endif /* __BOARD_H__ */
57 
58 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/