File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -615,6 +615,7 @@ set(INCLUDE_FILES
615615 drivers/DebugPins.h
616616 drivers/InternalFlash.h
617617 drivers/Hrs3300.h
618+ drivers/PinMap.h
618619 drivers/Bma421.h
619620 drivers/Bma421_C/bma4.c
620621 drivers/Bma421_C/bma423.c
Original file line number Diff line number Diff line change 33#include < drivers/include/nrfx_saadc.h>
44#include < array>
55#include < numeric>
6+ #include < drivers/PinMap.h>
67
78namespace Pinetime {
89 namespace Controllers {
@@ -72,7 +73,7 @@ namespace Pinetime {
7273 static constexpr uint8_t percentRemainingSamples = 5 ;
7374 CircBuffer<percentRemainingSamples> percentRemainingBuffer {};
7475
75- static constexpr uint32_t chargingPin = 12 ;
76+ static constexpr uint32_t chargingPin = PINMAP_CHARGING_PIN ;
7677 static constexpr uint32_t powerPresentPin = 19 ;
7778 static constexpr nrf_saadc_input_t batteryVoltageAdcInput = NRF_SAADC_INPUT_AIN7;
7879 uint16_t voltage = 0 ;
Original file line number Diff line number Diff line change 11#pragma once
22
33#include " TwiMaster.h"
4+ #include < drivers/PinMap.h>
45
56namespace Pinetime {
67 namespace Drivers {
@@ -40,7 +41,7 @@ namespace Pinetime {
4041
4142 private:
4243 static constexpr uint8_t pinIrq = 28 ;
43- static constexpr uint8_t pinReset = 10 ;
44+ static constexpr uint8_t pinReset = PINMAP_CST816S_RESET_PIN ;
4445 static constexpr uint8_t lastTouchId = 0x0f ;
4546 static constexpr uint8_t touchPointNumIndex = 2 ;
4647 static constexpr uint8_t touchMiscIndex = 8 ;
Original file line number Diff line number Diff line change 1+ #pragma once
2+
3+ #ifdef WATCH_P8
4+
5+ // BatteryController.h
6+ #define PINMAP_CHARGING_PIN 19
7+
8+ // Cst816s.h
9+ #define PINMAP_CST816S_RESET_PIN 13
10+
11+ // SystemTask.h
12+ #define PINMAP_BUTTON_PIN 17
13+
14+ #else
15+
16+ // BatteryController.h
17+ #define PINMAP_CHARGING_PIN 12
18+
19+ // Cst816s.h
20+ #define PINMAP_CST816S_RESET_PIN 10
21+
22+ // SystemTask.h
23+ #define PINMAP_BUTTON_PIN 13
24+
25+ #endif
Original file line number Diff line number Diff line change 88#include < heartratetask/HeartRateTask.h>
99#include < components/settings/Settings.h>
1010#include < drivers/Bma421.h>
11+ #include < drivers/PinMap.h>
1112#include < components/motion/MotionController.h>
1213
1314#include " SystemMonitor.h"
@@ -120,7 +121,7 @@ namespace Pinetime {
120121 static constexpr uint8_t pinSpiMiso = 4 ;
121122 static constexpr uint8_t pinSpiCsn = 25 ;
122123 static constexpr uint8_t pinLcdDataCommand = 18 ;
123- static constexpr uint8_t pinButton = 13 ;
124+ static constexpr uint8_t pinButton = PINMAP_BUTTON_PIN ;
124125 static constexpr uint8_t pinTouchIrq = 28 ;
125126 static constexpr uint8_t pinPowerPresentIrq = 19 ;
126127
You can’t perform that action at this time.
0 commit comments