1 /** 2 ****************************************************************************** 3 * @file board.h 4 * @author MCD Application Team 5 * @brief board header file for stm32l562_dk. 6 ****************************************************************************** 7 * @attention 8 * 9 * <h2><center>© 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 22 /* config for usart */ 23 #define COM_INSTANCE USART1 24 #define COM_CLK_ENABLE() __HAL_RCC_USART1_CLK_ENABLE() 25 #define COM_CLK_DISABLE() __HAL_RCC_USART1_CLK_DISABLE() 26 #define COM_TX_GPIO_PORT GPIOA 27 #define COM_TX_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE() 28 #define COM_TX_PIN GPIO_PIN_9 29 #define COM_TX_AF GPIO_AF7_USART1 30 31 #define COM_RX_GPIO_PORT GPIOA 32 #define COM_RX_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE() 33 #define COM_RX_PIN GPIO_PIN_10 34 #define COM_RX_AF GPIO_AF7_USART1 35 /* config for flash driver */ 36 #define FLASH0_SECTOR_SIZE 0x1000 37 #define FLASH0_PAGE_SIZE 0x800 38 #define FLASH0_PROG_UNIT 0x8 39 #define FLASH0_ERASED_VAL 0xff 40 #endif /* __BOARD_H__ */ 41 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/