SystemTask: fix static cast missing brackets syntax
The static_cast syntax requires brackets around the input variable. The implementation worked because the used input are defines, which add the missing brackets like the following: ```cpp #define GPIO_PIN_CNF_SENSE_Low (3UL) ```
This commit is contained in:
parent
32fe7b660c
commit
5938b4b208
|
@ -197,13 +197,13 @@ void SystemTask::Work() {
|
||||||
// Touchscreen
|
// Touchscreen
|
||||||
nrf_gpio_cfg_sense_input(PinMap::Cst816sIrq,
|
nrf_gpio_cfg_sense_input(PinMap::Cst816sIrq,
|
||||||
static_cast<nrf_gpio_pin_pull_t>(GPIO_PIN_CNF_PULL_Pullup),
|
static_cast<nrf_gpio_pin_pull_t>(GPIO_PIN_CNF_PULL_Pullup),
|
||||||
static_cast<nrf_gpio_pin_sense_t> GPIO_PIN_CNF_SENSE_Low);
|
static_cast<nrf_gpio_pin_sense_t>(GPIO_PIN_CNF_SENSE_Low));
|
||||||
|
|
||||||
pinConfig.skip_gpio_setup = true;
|
pinConfig.skip_gpio_setup = true;
|
||||||
pinConfig.hi_accuracy = false;
|
pinConfig.hi_accuracy = false;
|
||||||
pinConfig.is_watcher = false;
|
pinConfig.is_watcher = false;
|
||||||
pinConfig.sense = static_cast<nrf_gpiote_polarity_t>(NRF_GPIOTE_POLARITY_HITOLO);
|
pinConfig.sense = static_cast<nrf_gpiote_polarity_t>(NRF_GPIOTE_POLARITY_HITOLO);
|
||||||
pinConfig.pull = static_cast<nrf_gpio_pin_pull_t> GPIO_PIN_CNF_PULL_Pullup;
|
pinConfig.pull = static_cast<nrf_gpio_pin_pull_t>(GPIO_PIN_CNF_PULL_Pullup);
|
||||||
|
|
||||||
nrfx_gpiote_in_init(PinMap::Cst816sIrq, &pinConfig, nrfx_gpiote_evt_handler);
|
nrfx_gpiote_in_init(PinMap::Cst816sIrq, &pinConfig, nrfx_gpiote_evt_handler);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue