From 40a643d203d2d21834dd2b35d83419a56a3939b6 Mon Sep 17 00:00:00 2001 From: Avamander Date: Fri, 2 Oct 2020 21:44:27 +0300 Subject: Renamed Components/ to components/ --- src/components/Brightness/BrightnessController.h | 28 ++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/components/Brightness/BrightnessController.h (limited to 'src/components/Brightness/BrightnessController.h') 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 + +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; + }; + } +} -- cgit v1.2.3