mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-01 10:20:38 +00:00
Merge pull request #1100 from kasjer/kasjer/da1469b_dk_usb-fix-button-config
da14695_dk_usb: Fix button configuration
This commit is contained in:
commit
2eaf99e0aa
@ -68,7 +68,7 @@ void board_init(void)
|
|||||||
hal_gpio_init_out(5, 0);
|
hal_gpio_init_out(5, 0);
|
||||||
|
|
||||||
// Button
|
// Button
|
||||||
hal_gpio_init_in(BUTTON_PIN, HAL_GPIO_PULL_NONE);
|
hal_gpio_init_in(BUTTON_PIN, HAL_GPIO_PULL_DOWN);
|
||||||
|
|
||||||
// 1ms tick timer
|
// 1ms tick timer
|
||||||
SysTick_Config(SystemCoreClock / 1000);
|
SysTick_Config(SystemCoreClock / 1000);
|
||||||
@ -101,8 +101,8 @@ void board_led_write(bool state)
|
|||||||
|
|
||||||
uint32_t board_button_read(void)
|
uint32_t board_button_read(void)
|
||||||
{
|
{
|
||||||
// button is active LOW
|
// button is active HIGH
|
||||||
return hal_gpio_read(BUTTON_PIN) ^ 1;
|
return hal_gpio_read(BUTTON_PIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
int board_uart_read(uint8_t* buf, int len)
|
int board_uart_read(uint8_t* buf, int len)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user