summaryrefslogtreecommitdiff
path: root/src/drivers/PinMap.h
blob: 117cf11fb967564b2b85f3c51f9ce7e63969ad9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#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
#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