From a1cef17c5bb66c453e4a8e83e52a56fe9173346c Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 12 Apr 2023 16:37:27 +1000 Subject: Leave the display reset pin alone; we don't need it --- src/drivers/touchwheel.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/drivers/touchwheel.cpp') diff --git a/src/drivers/touchwheel.cpp b/src/drivers/touchwheel.cpp index 9e0d99af..d5382b3d 100644 --- a/src/drivers/touchwheel.cpp +++ b/src/drivers/touchwheel.cpp @@ -18,10 +18,17 @@ namespace drivers { static const char* kTag = "TOUCHWHEEL"; static const uint8_t kTouchWheelAddress = 0x1C; +static const gpio_num_t kIntPin = GPIO_NUM_25; TouchWheel::TouchWheel() { - gpio_set_direction(GPIO_NUM_25, GPIO_MODE_INPUT); - gpio_set_pull_mode(GPIO_NUM_25, GPIO_PULLUP_ONLY); + gpio_config_t int_config{ + .pin_bit_mask = 1ULL << kIntPin, + .mode = GPIO_MODE_INPUT, + .pull_up_en = GPIO_PULLUP_ENABLE, + .pull_down_en = GPIO_PULLDOWN_DISABLE, + .intr_type = GPIO_INTR_DISABLE, + }; + gpio_config(&int_config); WriteRegister(Register::RESET, 1); // TODO(daniel): do we need this? how long does reset take? -- cgit v1.2.3