convert usart.c to cpp class
This commit is contained in:
18
Core/Inc/pindef.hpp
Normal file
18
Core/Inc/pindef.hpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "stm32f401xe.h"
|
||||
#include "stm32f4xx_hal.h"
|
||||
|
||||
constexpr const uint16_t B1_Pin = GPIO_PIN_13;
|
||||
constexpr const uint16_t USART_TX_Pin = GPIO_PIN_2;
|
||||
constexpr const uint16_t USART_RX_Pin = GPIO_PIN_3;
|
||||
constexpr const uint16_t LD2_Pin = GPIO_PIN_5;
|
||||
constexpr const uint16_t TMS_Pin = GPIO_PIN_13;
|
||||
constexpr const uint16_t TCK_Pin = GPIO_PIN_14;
|
||||
constexpr const uint16_t SWO_Pin = GPIO_PIN_3;
|
||||
|
||||
inline GPIO_TypeDef* B1_GPIO_Port = GPIOC;
|
||||
inline GPIO_TypeDef* USART_TX_GPIO_Port = GPIOA;
|
||||
inline GPIO_TypeDef* USART_RX_GPIO_Port = GPIOA;
|
||||
inline GPIO_TypeDef* LD2_GPIO_Port = GPIOA;
|
||||
inline GPIO_TypeDef* TMS_GPIO_Port = GPIOA;
|
||||
inline GPIO_TypeDef* TCK_GPIO_Port = GPIOA;
|
||||
inline GPIO_TypeDef* SWO_GPIO_Port = GPIOB;
|
Reference in New Issue
Block a user