summaryrefslogtreecommitdiff
path: root/src/drivers/touchwheel.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-04-12 16:37:27 +1000
committerjacqueline <me@jacqueline.id.au>2023-04-12 16:37:27 +1000
commita1cef17c5bb66c453e4a8e83e52a56fe9173346c (patch)
treebd68127ed20bdb7ade3efe316e1f877f8db17dc9 /src/drivers/touchwheel.cpp
parentc93ed8efad85996e8ec3cec68bdc8feeae71b8fc (diff)
downloadtangara-fw-a1cef17c5bb66c453e4a8e83e52a56fe9173346c.tar.gz
Leave the display reset pin alone; we don't need it
Diffstat (limited to 'src/drivers/touchwheel.cpp')
-rw-r--r--src/drivers/touchwheel.cpp11
1 files changed, 9 insertions, 2 deletions
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?