mirror of https://gitee.com/ptower/pmu.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.3 KiB
52 lines
1.3 KiB
|
|
#ifndef __BSP_H__
|
|
#define __BSP_H__
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
|
|
/** @addtogroup BSP
|
|
* @{
|
|
*/
|
|
|
|
typedef enum
|
|
{
|
|
LED4 = 0,
|
|
LED_GREEN = LED4
|
|
} Led_TypeDef;
|
|
|
|
#define LEDn 1
|
|
#define LED4_PIN GPIO_PIN_4
|
|
#define LED4_GPIO_PORT GPIOA
|
|
#define LED4_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
|
|
#define LED4_GPIO_CLK_DISABLE() __HAL_RCC_GPIOA_CLK_DISABLE()
|
|
|
|
#ifdef HAL_UART_MODULE_ENABLED
|
|
//debug printf redirect config
|
|
#define USART_BAUDRATE 115200
|
|
|
|
#define DEBUG_USART USART2
|
|
|
|
#define USART_RX_GPIO_PORT GPIOA
|
|
#define USART_RX_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
|
|
#define USART_RX_PIN GPIO_PIN_3
|
|
#define USART_RX_AF GPIO_AF4_USART2
|
|
|
|
#define USART_TX_GPIO_PORT GPIOA
|
|
#define USART_TX_GPIO_CLK_ENABLE() __HAL_RCC_GPIOA_CLK_ENABLE()
|
|
#define USART_TX_PIN GPIO_PIN_2
|
|
#define USART_TX_AF GPIO_AF4_USART2
|
|
|
|
#define USART_IRQHandler USART2_IRQHandler
|
|
#define USART_IRQ USART2_IRQn
|
|
#endif
|
|
/************************************************************/
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* __BSP_H__ */
|