summaryrefslogtreecommitdiff
path: root/src/Components/Brightness/BrightnessController.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Components/Brightness/BrightnessController.h')
-rw-r--r--src/Components/Brightness/BrightnessController.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/Components/Brightness/BrightnessController.h b/src/Components/Brightness/BrightnessController.h
new file mode 100644
index 00000000..b8354ec0
--- /dev/null
+++ b/src/Components/Brightness/BrightnessController.h
@@ -0,0 +1,28 @@
+#pragma once
+
+#include <cstdint>
+
+namespace Pinetime {
+ namespace Controllers {
+ class BrightnessController {
+ public:
+ enum class Levels {Off, Low, Medium, High};
+ void Init();
+
+ void Set(Levels level);
+ Levels Level() const;
+ void Lower();
+ void Higher();
+
+ void Backup();
+ void Restore();
+
+ private:
+ static constexpr uint8_t pinLcdBacklight1 = 14;
+ static constexpr uint8_t pinLcdBacklight2 = 22;
+ static constexpr uint8_t pinLcdBacklight3 = 23;
+ Levels level = Levels::High;
+ Levels backupLevel = Levels::High;
+ };
+ }
+}