summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/Cst816s.h3
-rw-r--r--src/drivers/PinMap.h25
2 files changed, 27 insertions, 1 deletions
diff --git a/src/drivers/Cst816s.h b/src/drivers/Cst816s.h
index 14c296ea..fa53907a 100644
--- a/src/drivers/Cst816s.h
+++ b/src/drivers/Cst816s.h
@@ -1,6 +1,7 @@
#pragma once
#include "TwiMaster.h"
+#include <drivers/PinMap.h>
namespace Pinetime {
namespace Drivers {
@@ -40,7 +41,7 @@ namespace Pinetime {
private:
static constexpr uint8_t pinIrq = 28;
- static constexpr uint8_t pinReset = 10;
+ static constexpr uint8_t pinReset = PINMAP_CST816S_RESET_PIN;
static constexpr uint8_t lastTouchId = 0x0f;
static constexpr uint8_t touchPointNumIndex = 2;
static constexpr uint8_t touchMiscIndex = 8;
diff --git a/src/drivers/PinMap.h b/src/drivers/PinMap.h
new file mode 100644
index 00000000..61bb10e4
--- /dev/null
+++ b/src/drivers/PinMap.h
@@ -0,0 +1,25 @@
+#pragma once
+
+#ifdef WATCH_P8
+
+// BatteryController.h
+#define PINMAP_CHARGING_PIN 19
+
+// Cst816s.h
+#define PINMAP_CST816S_RESET_PIN 13
+
+// SystemTask.h
+#define PINMAP_BUTTON_PIN 17
+
+#else
+
+// BatteryController.h
+#define PINMAP_CHARGING_PIN 12
+
+// Cst816s.h
+#define PINMAP_CST816S_RESET_PIN 10
+
+// SystemTask.h
+#define PINMAP_BUTTON_PIN 13
+
+#endif \ No newline at end of file