minor clean up

This commit is contained in:
hathach
2024-11-08 22:53:28 +07:00
parent c8d104fb47
commit 3831786ede
7 changed files with 8 additions and 16 deletions

View File

@@ -41,7 +41,7 @@
static board_pindef_t board_pindef[] = {
{ // LED
.port = GPIOC,
.pin_init = { .Pin = GPIO_PIN_4, .Mode = GPIO_MODE_OUTPUT_PP, .Pull = GPIO_PULLDOWN, .Speed = GPIO_SPEED_HIGH, .Alternate = 0 },
.pin_init = { .Pin = GPIO_PIN_1, .Mode = GPIO_MODE_OUTPUT_PP, .Pull = GPIO_PULLDOWN, .Speed = GPIO_SPEED_HIGH, .Alternate = 0 },
.active_state = 1
},
{ // BUTTON

View File

@@ -47,8 +47,8 @@ static board_pindef_t board_pindef[] = {
},
{ // BUTTON
.port = GPIOE,
.pin_init = { .Pin = GPIO_PIN_4, .Mode = GPIO_MODE_INPUT, .Pull = GPIO_PULLDOWN, .Speed = GPIO_SPEED_HIGH, .Alternate = 0 },
.active_state = 1
.pin_init = { .Pin = GPIO_PIN_4, .Mode = GPIO_MODE_INPUT, .Pull = GPIO_PULLUP, .Speed = GPIO_SPEED_HIGH, .Alternate = 0 },
.active_state = 0
},
{ // UART TX
.port = GPIOA,

View File

@@ -31,16 +31,6 @@
extern "C" {
#endif
// LED
#define LED_PORT GPIOE
#define LED_PIN GPIO_PIN_2
#define LED_STATE_ON 0
// Button
#define BUTTON_PORT GPIOA
#define BUTTON_PIN GPIO_PIN_0
#define BUTTON_STATE_ACTIVE 1
// UART Enable PA2 as the debug log UART
#define UART_DEV USART2