-
Notifications
You must be signed in to change notification settings - Fork 2
/
definitions.h
executable file
·69 lines (61 loc) · 1.41 KB
/
definitions.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
// ESP32
// SPI MOSI MISO SCLK CS
// VSPI GPIO 23 GPIO 19 GPIO 18 GPIO 5
// HSPI GPIO 13 GPIO 12 GPIO 14 GPIO 15
// setSpiPin(14, 12, 13, 15);
// BASICS2
// #define SPIBUS 2
// #define SPIIOCLK 12
// #define SPIIOMISO 13
// #define SPIIOMOSI 11
// #define SPIIOCS0 10
#define ESP32BASICUSB
#ifdef ESP32BASICUSB
typedef enum {
INDLEDPIN = 19,
INDLEDISRGBW = 1,
IOE1 = 32,
IOE2 = 33,
IOE3 = 36, // ADC
IOE4 = 39, // ADC
ADCEX = 27,
BUTTON1 = 0,
SPIBUS = 2,
} PIN_DEFS;
#elif defined(ESP32BASICS3)
// Controller SPI0 is reserved for caching external memories like Flash
// Controller SPI1 is reserved for external memories like PSRAM
// Controller SPI2 can be used as general purpose SPI (GPSPI) - SPI2_HOST (also called FSPI or HSPI)
// Controller SPI3 can be used as general purpose SPI (GPSPI) - SPI3_HOST (also called VSPI)
typedef enum {
INDLEDPIN = 19,
INDLEDISRGBW = 1,
IOE1 = 32,
IOE2 = 33,
IOE3 = 36, // ADC
IOE4 = 39, // ADC
ADCEX = 27,
BUTTON1 = 0,
SPIBUS = 2,
SPIIOCLK = 13,
SPIIOMISO = 12,
SPIIOMOSI = 11,
SPIIOCS0 = 10,
} PIN_DEFS;
#else
typedef enum {
INDLEDPIN = 19,
INDLEDISRGBW = 1,
IOE1 = 1,
IOE2 = 2,
IOE3 = 3,
IOE4 = 6,
ADCEX = 14,
BUTTON1 = 0,
SPIBUS = 2,
JTAG1 = 39, // TCK
JTAG2 = 40, // TDO
JTAG3 = 41, // TDI
JTAG4 = 42, // TMS
} PIN_DEFS;
#endif