diff options
author | Reinhold Gschweicher <pyro4hell@gmail.com> | 2022-01-29 21:46:31 +0100 |
---|---|---|
committer | JF <JF002@users.noreply.github.com> | 2022-02-12 18:38:31 +0100 |
commit | 5938b4b208e5684c13716fce16c3982182fd40f7 (patch) | |
tree | 9a3c56734da75724193e2142cdca6d61d36e6181 | |
parent | 32fe7b660c59cda789a16f30e1371b087fdab6a0 (diff) |
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)
```
-rw-r--r-- | src/systemtask/SystemTask.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/systemtask/SystemTask.cpp b/src/systemtask/SystemTask.cpp index 241b29bf..e71ebc17 100644 --- a/src/systemtask/SystemTask.cpp +++ b/src/systemtask/SystemTask.cpp @@ -197,13 +197,13 @@ void SystemTask::Work() { // Touchscreen nrf_gpio_cfg_sense_input(PinMap::Cst816sIrq, 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.hi_accuracy = false; pinConfig.is_watcher = false; 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); |