summaryrefslogtreecommitdiff
path: root/src/drivers/touchwheel.cpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-08-21 15:43:23 +1000
committerjacqueline <me@jacqueline.id.au>2023-08-21 15:43:23 +1000
commit764b01e913d0123747757e5efd3545d46e921848 (patch)
tree76f0a1d2afb4b60818cc46fd5649938713f2f261 /src/drivers/touchwheel.cpp
parent27f329a9dbf18a046ade534c9330b03e586cdb98 (diff)
downloadtangara-fw-764b01e913d0123747757e5efd3545d46e921848.tar.gz
Add idle->standby support when locked and no music
Diffstat (limited to 'src/drivers/touchwheel.cpp')
-rw-r--r--src/drivers/touchwheel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/touchwheel.cpp b/src/drivers/touchwheel.cpp
index 59c2911e..6b925055 100644
--- a/src/drivers/touchwheel.cpp
+++ b/src/drivers/touchwheel.cpp
@@ -22,6 +22,8 @@
namespace drivers {
+// Touch wheel implementation using a Microchip AT42QT2120
+
static const char* kTag = "TOUCHWHEEL";
static const uint8_t kTouchWheelAddress = 0x1C;
static const gpio_num_t kIntPin = GPIO_NUM_25;
@@ -121,4 +123,8 @@ TouchWheelData TouchWheel::GetTouchWheelData() const {
return data_;
}
+auto TouchWheel::PowerDown() -> void {
+ WriteRegister(LOW_POWER, 0);
+}
+
} // namespace drivers