diff options
author | Finlay Davidson <finlay.davidson@coderclass.nl> | 2023-01-07 21:23:15 +0100 |
---|---|---|
committer | JF <JF002@users.noreply.github.com> | 2023-01-09 21:41:21 +0100 |
commit | 96165a8541b33baace920e26f062b2e282d644c6 (patch) | |
tree | 41a5c6ec1f9a9981fcf970b7b48095b54c142d64 /src/drivers | |
parent | 09db67e003ab593956b4d4474fd08e7548985030 (diff) |
Format header files
In my PR updating clang-format, I forgot to also format the headers.
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/Bma421.h | 3 | ||||
-rw-r--r-- | src/drivers/Cst816s.h | 3 | ||||
-rw-r--r-- | src/drivers/SpiMaster.h | 1 | ||||
-rw-r--r-- | src/drivers/SpiNorFlash.h | 1 | ||||
-rw-r--r-- | src/drivers/St7789.h | 1 | ||||
-rw-r--r-- | src/drivers/Watchdog.h | 3 |
6 files changed, 12 insertions, 0 deletions
diff --git a/src/drivers/Bma421.h b/src/drivers/Bma421.h index ac5c707f..fb832514 100644 --- a/src/drivers/Bma421.h +++ b/src/drivers/Bma421.h @@ -4,15 +4,18 @@ namespace Pinetime { namespace Drivers { class TwiMaster; + class Bma421 { public: enum class DeviceTypes : uint8_t { Unknown, BMA421, BMA425 }; + struct Values { uint32_t steps; int16_t x; int16_t y; int16_t z; }; + Bma421(TwiMaster& twiMaster, uint8_t twiAddress); Bma421(const Bma421&) = delete; Bma421& operator=(const Bma421&) = delete; diff --git a/src/drivers/Cst816s.h b/src/drivers/Cst816s.h index 9d426c9d..c50bb733 100644 --- a/src/drivers/Cst816s.h +++ b/src/drivers/Cst816s.h @@ -16,6 +16,7 @@ namespace Pinetime { DoubleTap = 0x0B, LongPress = 0x0C }; + struct TouchInfos { uint16_t x = 0; uint16_t y = 0; @@ -38,9 +39,11 @@ namespace Pinetime { uint8_t GetChipId() const { return chipId; } + uint8_t GetVendorId() const { return vendorId; } + uint8_t GetFwVersion() const { return fwVersion; } diff --git a/src/drivers/SpiMaster.h b/src/drivers/SpiMaster.h index 5ea624f2..cba140a6 100644 --- a/src/drivers/SpiMaster.h +++ b/src/drivers/SpiMaster.h @@ -14,6 +14,7 @@ namespace Pinetime { enum class BitOrder : uint8_t { Msb_Lsb, Lsb_Msb }; enum class Modes : uint8_t { Mode0, Mode1, Mode2, Mode3 }; enum class Frequencies : uint8_t { Freq8Mhz }; + struct Parameters { BitOrder bitOrder; Modes mode; diff --git a/src/drivers/SpiNorFlash.h b/src/drivers/SpiNorFlash.h index ad4d0907..8a063fea 100644 --- a/src/drivers/SpiNorFlash.h +++ b/src/drivers/SpiNorFlash.h @@ -5,6 +5,7 @@ namespace Pinetime { namespace Drivers { class Spi; + class SpiNorFlash { public: explicit SpiNorFlash(Spi& spi); diff --git a/src/drivers/St7789.h b/src/drivers/St7789.h index 8c2ac093..8a1bdfca 100644 --- a/src/drivers/St7789.h +++ b/src/drivers/St7789.h @@ -5,6 +5,7 @@ namespace Pinetime { namespace Drivers { class Spi; + class St7789 { public: explicit St7789(Spi& spi, uint8_t pinDataCommand); diff --git a/src/drivers/Watchdog.h b/src/drivers/Watchdog.h index 03807d61..22aa9df6 100644 --- a/src/drivers/Watchdog.h +++ b/src/drivers/Watchdog.h @@ -9,9 +9,11 @@ namespace Pinetime { void Setup(uint8_t timeoutSeconds); void Start(); void Kick(); + ResetReasons ResetReason() const { return resetReason; } + static const char* ResetReasonToString(ResetReasons reason); private: @@ -23,6 +25,7 @@ namespace Pinetime { public: WatchdogView(const Watchdog& watchdog) : watchdog {watchdog} { } + Watchdog::ResetReasons ResetReason() const { return watchdog.ResetReason(); } |