Skip to content

Commit b3e6da7

Browse files
committed
Cleanup, set Pinetime as default
1 parent b7aa04e commit b3e6da7

3 files changed

Lines changed: 18 additions & 42 deletions

File tree

src/components/battery/BatteryController.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "BatteryController.h"
2+
#include "drivers/PinMap.h"
23
#include <hal/nrf_gpio.h>
34
#include <nrfx_saadc.h>
45
#include <algorithm>

src/components/battery/BatteryController.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include <drivers/include/nrfx_saadc.h>
44
#include <array>
55
#include <numeric>
6-
#include <drivers/PinMap.h>
76

87
namespace Pinetime {
98
namespace Controllers {

src/drivers/PinMap.h

Lines changed: 17 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,37 @@
22

33
namespace Pinetime {
44
namespace PinMap {
5-
#define WATCH_P8
5+
66
#ifdef WATCH_P8
7+
// COLMI P8
78
static constexpr uint8_t Charging = 19;
89
static constexpr uint8_t Cst816sReset = 13;
910
static constexpr uint8_t Button = 17;
1011
#else
12+
// Pinetime
1113
static constexpr uint8_t Charging = 12;
1214
static constexpr uint8_t Cst816sReset = 10;
1315
static constexpr uint8_t Button = 13;
1416
#endif
1517

16-
static constexpr uint8_t Cst816sIrq = 28;
17-
static constexpr uint8_t PowerPresent = 19;
18+
static constexpr uint8_t Cst816sIrq = 28;
19+
static constexpr uint8_t PowerPresent = 19;
1820

19-
static constexpr uint8_t Motor = 16;
21+
static constexpr uint8_t Motor = 16;
2022

21-
static constexpr uint8_t LcdBacklight1 = 14;
22-
static constexpr uint8_t LcdBacklight2 = 22;
23-
static constexpr uint8_t LcdBacklight3 = 23;
23+
static constexpr uint8_t LcdBacklight1 = 14;
24+
static constexpr uint8_t LcdBacklight2 = 22;
25+
static constexpr uint8_t LcdBacklight3 = 23;
2426

25-
static constexpr uint8_t SpiSck = 2;
26-
static constexpr uint8_t SpiMosi = 3;
27-
static constexpr uint8_t SpiMiso = 4;
27+
static constexpr uint8_t SpiSck = 2;
28+
static constexpr uint8_t SpiMosi = 3;
29+
static constexpr uint8_t SpiMiso = 4;
2830

29-
static constexpr uint8_t SpiFlashCsn = 5;
30-
static constexpr uint8_t SpiLcdCsn = 25;
31-
static constexpr uint8_t LcdDataCommand = 18;
32-
33-
static constexpr uint8_t TwiScl = 7;
34-
static constexpr uint8_t TwiSda = 6;
31+
static constexpr uint8_t SpiFlashCsn = 5;
32+
static constexpr uint8_t SpiLcdCsn = 25;
33+
static constexpr uint8_t LcdDataCommand = 18;
3534

35+
static constexpr uint8_t TwiScl = 7;
36+
static constexpr uint8_t TwiSda = 6;
3637
}
3738
}
38-
39-
40-
#ifdef WATCH_P8
41-
42-
// BatteryController.h
43-
#define PINMAP_CHARGING_PIN 19
44-
45-
// Cst816s.h
46-
#define PINMAP_CST816S_RESET_PIN 13
47-
48-
// SystemTask.h
49-
#define PINMAP_BUTTON_PIN 17
50-
51-
#else
52-
53-
// BatteryController.h
54-
#define PINMAP_CHARGING_PIN 12
55-
56-
// Cst816s.h
57-
#define PINMAP_CST816S_RESET_PIN 10
58-
59-
// SystemTask.h
60-
#define PINMAP_BUTTON_PIN 13
61-
62-
#endif

0 commit comments

Comments
 (0)