structure PinIndex
This commit is contained in:
parent
0227427b6f
commit
13087c0cc1
4 changed files with 18 additions and 15 deletions
|
@ -131,6 +131,10 @@ void setup() {
|
|||
LoadConfig();
|
||||
Wifi_Init();
|
||||
Webserver_Init();
|
||||
Serial.printf("Usable Pins: %d\n", PinIndex_length);
|
||||
for(byte i = 0; i < PinIndex_length; i++) {
|
||||
Serial.printf("Pin Index: %d, GPIO: %d, Notes: %d\n", i, PinIndex[i].gpio, PinIndex[i].note);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -105,20 +105,19 @@ Config config;
|
|||
/* actual structure initialization for Pin_Index is done within the header files
|
||||
* for ESP32 and ESP8266
|
||||
*
|
||||
* notes explenation:
|
||||
* - BF_L: BootFails when LOW
|
||||
* - BF_H: BootFails when HIGH
|
||||
* - FM_L: FlashMode needs LOW to enter
|
||||
* - IN_O: Input Only
|
||||
* Pin_Index.note explenation:
|
||||
* 1 - BF_L: BootFails when LOW
|
||||
* 2 - BF_H: BootFails when HIGH
|
||||
* 3 - FM_L: FlashMode needs LOW to enter
|
||||
* 4 - IN_O: Input Only
|
||||
*/
|
||||
const char* BF_L = "BF_L";
|
||||
const char* BF_H = "BF_H";
|
||||
const char* FM_L = "FM_L";
|
||||
const char* IN_O = "IN_O";
|
||||
const byte BF_L = 1;
|
||||
const byte BF_H = 2;
|
||||
const byte FM_L = 3;
|
||||
const byte IN_O = 4;
|
||||
|
||||
struct Pin_Index {
|
||||
const byte gpio;
|
||||
const char* notes[8];
|
||||
char* usedBy[8];
|
||||
const byte note;
|
||||
};
|
||||
|
||||
|
|
|
@ -61,9 +61,9 @@
|
|||
|
||||
|
||||
//
|
||||
const byte pinIndex_length = 21;
|
||||
const byte PinIndex_length = 21;
|
||||
// initialize pinIndex with all usable GPIOs
|
||||
Pin_Index pinIndex[] = { { 0, FM_L },
|
||||
Pin_Index PinIndex[] = { { 0, FM_L },
|
||||
{ 4 },
|
||||
{ 5 },
|
||||
{ 12, BF_H },
|
||||
|
|
|
@ -45,9 +45,9 @@
|
|||
* - GPIO 16 / D0
|
||||
*/
|
||||
|
||||
const byte pinIndex_length = 6;
|
||||
const byte PinIndex_length = 6;
|
||||
// initialize pinIndex with all usable GPIOs
|
||||
Pin_Index pinIndex[] = { { 0, BF_L },
|
||||
Pin_Index PinIndex[] = { { 0, BF_L },
|
||||
{ 12 },
|
||||
{ 13 },
|
||||
{ 14 },
|
||||
|
|
Loading…
Reference in a new issue