diff options
| author | hathach <[email protected]> | 2019-03-30 23:01:23 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-03-30 23:01:23 +0700 |
| commit | eabfc53f38dc538b44615aed32db66484a3acca4 (patch) | |
| tree | e1ad77937c1ed4b2f3d81636d4f94fe2d25647e3 /hw | |
| parent | f3a954e7deaa33db5fed8e807cd146e65aaeb104 (diff) | |
added tud_suspended() and tud_ready()
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/bsp/pca10056/board_pca10056.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/bsp/pca10056/board_pca10056.c b/hw/bsp/pca10056/board_pca10056.c index 90f466356..493508841 100644 --- a/hw/bsp/pca10056/board_pca10056.c +++ b/hw/bsp/pca10056/board_pca10056.c @@ -44,7 +44,7 @@ uint8_t _button_pins[] = { 11, 12, 24, 25 }; -#define BOARD_BUTTON_COUNT sizeof(_button_pins) +#define BUTTON_COUNT sizeof(_button_pins) /*------------------------------------------------------------------*/ @@ -84,7 +84,7 @@ void board_init(void) board_led_control(false); // Button - for(uint8_t i=0; i<BOARD_BUTTON_COUNT; i++) nrf_gpio_cfg_input(_button_pins[i], NRF_GPIO_PIN_PULLUP); + for(uint8_t i=0; i<BUTTON_COUNT; i++) nrf_gpio_cfg_input(_button_pins[i], NRF_GPIO_PIN_PULLUP); #if CFG_TUSB_OS == OPT_OS_NONE // 1ms tick timer @@ -138,10 +138,10 @@ uint32_t board_buttons(void) { uint32_t ret = 0; - for(uint8_t i=0; i<BOARD_BUTTON_COUNT; i++) + for(uint8_t i=0; i<BUTTON_COUNT; i++) { // button is active LOW - ret |= ( nrf_gpio_pin_read(_button_pins[i]) ? 0 : (1 << i)); + ret |= (nrf_gpio_pin_read(_button_pins[i]) ? 0 : (1 << i)); } return ret; |
