diff options
| author | Ha Thach <[email protected]> | 2021-09-23 18:45:02 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-09-23 18:45:02 +0700 |
| commit | 2eaf99e0aa9c10d62dd8d0a4e765f5941bfeaf98 (patch) | |
| tree | 4ae7ea6ee67f3bbcba78e0267ce489dec8eda789 | |
| parent | 040300540c5be7622f1d24d7d0e5e32819eff6cf (diff) | |
| parent | 417677aae40469594ba69b70a41d988522c5ec96 (diff) | |
Merge pull request #1100 from kasjer/kasjer/da1469b_dk_usb-fix-button-config
da14695_dk_usb: Fix button configuration
| -rw-r--r-- | hw/bsp/da14695_dk_usb/da14695_dk_usb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/bsp/da14695_dk_usb/da14695_dk_usb.c b/hw/bsp/da14695_dk_usb/da14695_dk_usb.c index bdb30e0e5..95fe70d01 100644 --- a/hw/bsp/da14695_dk_usb/da14695_dk_usb.c +++ b/hw/bsp/da14695_dk_usb/da14695_dk_usb.c @@ -68,7 +68,7 @@ void board_init(void) hal_gpio_init_out(5, 0); // Button - hal_gpio_init_in(BUTTON_PIN, HAL_GPIO_PULL_NONE); + hal_gpio_init_in(BUTTON_PIN, HAL_GPIO_PULL_DOWN); // 1ms tick timer SysTick_Config(SystemCoreClock / 1000); @@ -101,8 +101,8 @@ void board_led_write(bool state) uint32_t board_button_read(void) { - // button is active LOW - return hal_gpio_read(BUTTON_PIN) ^ 1; + // button is active HIGH + return hal_gpio_read(BUTTON_PIN); } int board_uart_read(uint8_t* buf, int len) |
