diff options
| author | hubmartin <hub.martin@gmail.com> | 2021-08-03 18:32:23 (GMT) |
|---|---|---|
| committer | hubmartin <hub.martin@gmail.com> | 2021-08-03 18:32:23 (GMT) |
| commit | b7aa04e1f55096d754a7cc291f02f3430f5a3cd9 (patch) | |
| tree | 6462cbd332cf813f9a173b0783521ef9714c45bb /src/drivers/PinMap.h | |
| parent | 28abeae21bb370c45d26912bba4737a1cc6ddca7 (diff) | |
PinMap with namespace and constexpr
Diffstat (limited to 'src/drivers/PinMap.h')
| -rw-r--r-- | src/drivers/PinMap.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/drivers/PinMap.h b/src/drivers/PinMap.h index 61bb10e..117cf11 100644 --- a/src/drivers/PinMap.h +++ b/src/drivers/PinMap.h @@ -1,5 +1,42 @@ #pragma once +namespace Pinetime { + namespace PinMap { + #define WATCH_P8 + #ifdef WATCH_P8 + static constexpr uint8_t Charging = 19; + static constexpr uint8_t Cst816sReset = 13; + static constexpr uint8_t Button = 17; + #else + static constexpr uint8_t Charging = 12; + static constexpr uint8_t Cst816sReset = 10; + static constexpr uint8_t Button = 13; + #endif + + static constexpr uint8_t Cst816sIrq = 28; + static constexpr uint8_t PowerPresent = 19; + + static constexpr uint8_t Motor = 16; + + static constexpr uint8_t LcdBacklight1 = 14; + static constexpr uint8_t LcdBacklight2 = 22; + static constexpr uint8_t LcdBacklight3 = 23; + + static constexpr uint8_t SpiSck = 2; + static constexpr uint8_t SpiMosi = 3; + static constexpr uint8_t SpiMiso = 4; + + static constexpr uint8_t SpiFlashCsn = 5; + static constexpr uint8_t SpiLcdCsn = 25; + static constexpr uint8_t LcdDataCommand = 18; + + static constexpr uint8_t TwiScl = 7; + static constexpr uint8_t TwiSda = 6; + + } +} + + #ifdef WATCH_P8 // BatteryController.h |
