CanGrow/include/Architecture/ESP32_LOLIN_S2_MINI.h

74 lines
2.7 KiB
C

/*
*
* include/CanGrow_ESP32.h - ESP32 specific header file for Lolin S2 Mini
*
*
*
*/
#ifdef ARDUINO_LOLIN_S2_MINI
#define PinWIPE 15
#define PinWIPE_default LOW
#define Pin_I2C_SCL 33
#define Pin_I2C_SDA 35
/* https://done.land/components/microcontroller/families/esp/esp32/developmentboards/esp32-s2/s2mini/
*
* free usable pins
Pin Remark Description
EN Reset button
3V3 direct power supply to CPU
VBUS connected to ME6211C33 voltage regulator
0 not exposed Boot button pulls it low
1-6 general purpose: analog input (ADC1) and digital in/output
7 SPI SCK general purpose: analog input (ADC1) and digital in/output
8 general purpose: analog input (ADC1) and digital in/output
9 SPI MISO general purpose: analog input (ADC1) and digital in/output
10 general purpose: analog input (ADC1) and digital in/output
11 SPI MOSI general purpose: analog input (ADC2) and digital in/output
12 SPI SS general purpose: analog input (ADC2) and digital in/output
13-14 general purpose: analog input (ADC2) and digital in/output
15 internal LED general purpose: analog input (ADC2) and digital in/output
16 general purpose: analog input (ADC2) and digital in/output
17 DAC1 general purpose: analog input (ADC2) and digital in/output
18 DAC2 general purpose: analog input (ADC2) and digital in/output
19, 20 not exposed USB D1/D2, connected to the USB C connector
21 general purpose digital in/output
33 I2C SDA general purpose digital in/output
34 general purpose digital in/output
35 I2C SCL general purpose digital in/output
36-40 general purpose digital in/output
*/
//
const byte GPIOindex_length = 24;
// initialize pinIndex with all usable GPIOs
GPIO_Index GPIOindex[] = {{ 255, 255 },
{ 1, INT_ADC },
{ 2, INT_ADC },
{ 3, INT_ADC },
{ 4, INT_ADC },
{ 5, INT_ADC },
{ 6, INT_ADC },
{ 7, INT_ADC },
{ 8, INT_ADC },
{ 9, INT_ADC },
{ 10, INT_ADC },
{ 11 },
{ 12 },
{ 13 },
{ 14 },
{ 16 },
{ 17, INT_DAC },
{ 18, INT_DAC },
{ 21 },
{ 34 },
{ 36 },
{ 37 },
{ 38 },
{ 39 },
{ 40 }
};
#endif