-
Notifications
You must be signed in to change notification settings - Fork 23
/
utilities.h
99 lines (73 loc) · 2.41 KB
/
utilities.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
#pragma once
#include <Arduino.h>
// #define VERSION_1
// #define HIGH_VOLTAGE
#ifndef _PINNUM
#define _PINNUM(port, pin) ((port)*32 + (pin))
#endif
#if defined(VERSION_1)
#define ePaper_Miso _PINNUM(1,3)
#else
#define ePaper_Miso _PINNUM(1,6)
#endif
#define ePaper_Mosi _PINNUM(0,29)
#define ePaper_Sclk _PINNUM(0,31)
#define ePaper_Cs _PINNUM(0,30)
#define ePaper_Dc _PINNUM(0,28)
#define ePaper_Rst _PINNUM(0,2)
#define ePaper_Busy _PINNUM(0,3)
#define ePaper_Backlight _PINNUM(1,11)
#define LoRa_Miso _PINNUM(0,23)
#define LoRa_Mosi _PINNUM(0,22)
#define LoRa_Sclk _PINNUM(0,19)
#define LoRa_Cs _PINNUM(0,24)
#define LoRa_Rst _PINNUM(0,25)
#if defined(VERSION_1)
#define LoRa_Dio0 _PINNUM(1,1)
#else
#define LoRa_Dio0 _PINNUM(0,22)
#endif
#define LoRa_Dio1 _PINNUM(0,20)
#define LoRa_Dio2 //_PINNUM(0,3)
#define LoRa_Dio3 _PINNUM(0,21)
#define LoRa_Dio4 //_PINNUM(0,3)
#define LoRa_Dio5 //_PINNUM(0,3)
#define LoRa_Busy _PINNUM(0,17)
#define Flash_Cs _PINNUM(1,15)
#define Flash_Miso _PINNUM(1,13)
#define Flash_Mosi _PINNUM(1,12)
#define Flash_Sclk _PINNUM(1,14)
#define Touch_Pin _PINNUM(0,11)
#define Adc_Pin _PINNUM(0,4)
#define SDA_Pin _PINNUM(0,26)
#define SCL_Pin _PINNUM(0,27)
#define RTC_Int_Pin _PINNUM(0,16)
#define Gps_Rx_Pin _PINNUM(1,9)
#define Gps_Tx_Pin _PINNUM(1,8)
#if defined(VERSION_1)
#define Gps_Wakeup_Pin _PINNUM(1,2)
#define Gps_pps_Pin _PINNUM(1,4)
#else
#define Gps_Wakeup_Pin _PINNUM(1,2)
#define Gps_Reset_Pin _PINNUM(1,5)
#define Gps_pps_Pin _PINNUM(1,4)
#endif
#define UserButton_Pin _PINNUM(1,10)
#if defined(VERSION_1)
#define Power_Enable_Pin _PINNUM(0,12)
#else
#define Power_Enable_Pin _PINNUM(0,12)
//#define Power_Enable1_Pin _PINNUM(0,13)
#endif
#if defined(VERSION_1)
#define GreenLed_Pin _PINNUM(0,13)
#define RedLed_Pin _PINNUM(0,14)
#define BlueLed_Pin _PINNUM(0,15)
#else
#define GreenLed_Pin _PINNUM(1,1)
#define RedLed_Pin _PINNUM(1,3)
#define BlueLed_Pin _PINNUM(0,14)
#endif
#define SerialMon Serial
#define SerialGPS Serial2
#define MONITOR_SPEED 115200