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>&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 
22 /* config for usart */
23 #define COM_INSTANCE                           LPUART1
24 #define COM_CLK_ENABLE()                       __HAL_RCC_LPUART1_CLK_ENABLE()
25 #define COM_CLK_DISABLE()                      __HAL_RCC_LPUART1_CLK_ENABLE()
26 #define COM_TX_GPIO_PORT                       GPIOG
27 #define COM_TX_GPIO_CLK_ENABLE()               __HAL_RCC_GPIOG_CLK_ENABLE();  __HAL_RCC_PWR_CLK_ENABLE(); __HAL_PWR_VDDIO2_ENABLE();
28 #define COM_TX_PIN                             GPIO_PIN_7
29 #define COM_TX_AF                              GPIO_AF8_LPUART1
30 
31 #define COM_RX_GPIO_PORT                       GPIOG
32 #define COM_RX_GPIO_CLK_ENABLE()               __HAL_RCC_GPIOG_CLK_ENABLE()
33 #define COM_RX_PIN                             GPIO_PIN_8
34 #define COM_RX_AF                              GPIO_AF8_LPUART1
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****/