-
Notifications
You must be signed in to change notification settings - Fork 344
/
Copy pathconfig.h
120 lines (101 loc) · 2.92 KB
/
config.h
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#ifndef CONFIG_H
#define CONFIG_H
// Versioning
#define WATCHY_LIB_VER "1.4.14"
//pins
#ifdef ARDUINO_ESP32S3_DEV //V3
#define WATCHY_V3_SDA 12
#define WATCHY_V3_SCL 11
#define WATCHY_V3_SS 33
#define WATCHY_V3_MOSI 48
#define WATCHY_V3_MISO 46
#define WATCHY_V3_SCK 47
#define MENU_BTN_PIN 7
#define BACK_BTN_PIN 6
#define UP_BTN_PIN 0
#define DOWN_BTN_PIN 8
#define DISPLAY_CS 33
#define DISPLAY_DC 34
#define DISPLAY_RES 35
#define DISPLAY_BUSY 36
#define ACC_INT_1_PIN 14
#define ACC_INT_2_PIN 13
#define VIB_MOTOR_PIN 17
#define BATT_ADC_PIN 9
#define CHRG_STATUS_PIN 10
#define USB_DET_PIN 21
#define RTC_INT_PIN -1 //not used
#define MENU_BTN_MASK (BIT64(7))
#define BACK_BTN_MASK (BIT64(6))
#define UP_BTN_MASK (BIT64(0))
#define DOWN_BTN_MASK (BIT64(8))
#define ACC_INT_MASK (BIT64(14))
#define BTN_PIN_MASK MENU_BTN_MASK|BACK_BTN_MASK|UP_BTN_MASK|DOWN_BTN_MASK
#else //V1,V1.5,V2
#if !defined(ARDUINO_WATCHY_V10) && !defined(ARDUINO_WATCHY_V15) && !defined(ARDUINO_WATCHY_V20)
#pragma message "Please install the latest ESP32 Arduino Core (2.0.5+) and choose Watchy as the target board"
#pragma message "Hardware revision is not defined at the project level, please define in config.h. Defaulting to ARDUINO_WATCHY_V20"
#define ARDUINO_WATCHY_V20
#define MENU_BTN_PIN 26
#define BACK_BTN_PIN 25
#define DOWN_BTN_PIN 4
#define DISPLAY_CS 5
#define DISPLAY_RES 9
#define DISPLAY_DC 10
#define DISPLAY_BUSY 19
#define ACC_INT_1_PIN 14
#define ACC_INT_2_PIN 12
#define VIB_MOTOR_PIN 13
#define RTC_INT_PIN 27
#if defined (ARDUINO_WATCHY_V10)
#define UP_BTN_PIN 32
#define BATT_ADC_PIN 33
#define UP_BTN_MASK (BIT64(32))
#define RTC_TYPE 1 //DS3231
#elif defined (ARDUINO_WATCHY_V15)
#define UP_BTN_PIN 32
#define BATT_ADC_PIN 35
#define UP_BTN_MASK (BIT64(32))
#define RTC_TYPE 2 //PCF8563
#elif defined (ARDUINO_WATCHY_V20)
#define UP_BTN_PIN 35
#define BATT_ADC_PIN 34
#define UP_BTN_MASK (BIT64(35))
#define RTC_TYPE 2 //PCF8563
#endif
#define MENU_BTN_MASK (BIT64(26))
#define BACK_BTN_MASK (BIT64(25))
#define DOWN_BTN_MASK (BIT64(4))
#define ACC_INT_MASK (BIT64(14))
#define BTN_PIN_MASK MENU_BTN_MASK|BACK_BTN_MASK|UP_BTN_MASK|DOWN_BTN_MASK
#endif
#endif
//display
#define DISPLAY_WIDTH 200
#define DISPLAY_HEIGHT 200
// wifi
#define WIFI_AP_TIMEOUT 60
#define WIFI_AP_SSID "Watchy AP"
// menu
#define WATCHFACE_STATE -1
#define MAIN_MENU_STATE 0
#define APP_STATE 1
#define FW_UPDATE_STATE 2
#define MENU_HEIGHT 25
#define MENU_LENGTH 7
// set time
#define SET_HOUR 0
#define SET_MINUTE 1
#define SET_YEAR 2
#define SET_MONTH 3
#define SET_DAY 4
#define HOUR_12_24 24
// BLE OTA
#define BLE_DEVICE_NAME "Watchy BLE OTA"
#define WATCHFACE_NAME "Watchy 7 Segment"
#define SOFTWARE_VERSION_MAJOR 1
#define SOFTWARE_VERSION_MINOR 0
#define SOFTWARE_VERSION_PATCH 0
#define HARDWARE_VERSION_MAJOR 1
#define HARDWARE_VERSION_MINOR 0
#endif