Unverified Commit 11c7d8e6 authored by Rodrigo Garcia's avatar Rodrigo Garcia Committed by GitHub

fixes non existent esp32_adc2gpio (#7526)

* fixes non existent esp32_adc2gpio

* remove blank spaces (style)
Co-authored-by: default avatarJan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com>
parent 7cbd0371
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#define NUM_DIGITAL_PINS 22 #define NUM_DIGITAL_PINS 22
#define NUM_ANALOG_INPUTS 6 #define NUM_ANALOG_INPUTS 6
#define analogInputToDigitalPin(p) (((p)<NUM_ANALOG_INPUTS)?(esp32_adc2gpio[(p)]):-1) #define analogInputToDigitalPin(p) (((p)<NUM_ANALOG_INPUTS)?(analogChannelToDigitalPin(p)):-1)
#define digitalPinToInterrupt(p) (((p)<NUM_DIGITAL_PINS)?(p):-1) #define digitalPinToInterrupt(p) (((p)<NUM_DIGITAL_PINS)?(p):-1)
#define digitalPinHasPWM(p) (p < EXTERNAL_NUM_INTERRUPTS) #define digitalPinHasPWM(p) (p < EXTERNAL_NUM_INTERRUPTS)
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#define NUM_DIGITAL_PINS 21 #define NUM_DIGITAL_PINS 21
#define NUM_ANALOG_INPUTS 12 #define NUM_ANALOG_INPUTS 12
#define analogInputToDigitalPin(p) (((p)<29)?(esp32_adc2gpio[(p)]):-1) #define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1) #define digitalPinToInterrupt(p) (((p)<48)?(p):-1)
#define digitalPinHasPWM(p) (p < 46) #define digitalPinHasPWM(p) (p < 46)
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
#define NUM_DIGITAL_PINS 4 #define NUM_DIGITAL_PINS 4
#define NUM_ANALOG_INPUTS 2 #define NUM_ANALOG_INPUTS 2
#define analogInputToDigitalPin(p) (((p)<29)?(esp32_adc2gpio[(p)]):-1) #define analogInputToDigitalPin(p) (((p)<6)?(analogChannelToDigitalPin(p)):-1)
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1) #define digitalPinToInterrupt(p) (((p)<22)?(p):-1)
#define digitalPinHasPWM(p) (p < 46) #define digitalPinHasPWM(p) (p < 22)
static const uint8_t TX = 21; static const uint8_t TX = 21;
static const uint8_t RX = 20; static const uint8_t RX = 20;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#define NUM_DIGITAL_PINS 15 #define NUM_DIGITAL_PINS 15
#define NUM_ANALOG_INPUTS 8 #define NUM_ANALOG_INPUTS 8
#define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(p)]):-1) #define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1) #define digitalPinToInterrupt(p) (((p)<48)?(p):-1)
#define digitalPinHasPWM(p) (p < 46) #define digitalPinHasPWM(p) (p < 46)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#define NUM_DIGITAL_PINS 40 #define NUM_DIGITAL_PINS 40
#define NUM_ANALOG_INPUTS 16 #define NUM_ANALOG_INPUTS 16
#define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(p)]):-1) #define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1) #define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
#define digitalPinHasPWM(p) (p < 34) #define digitalPinHasPWM(p) (p < 34)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#define NUM_DIGITAL_PINS 40 #define NUM_DIGITAL_PINS 40
#define NUM_ANALOG_INPUTS 16 #define NUM_ANALOG_INPUTS 16
#define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(p)]):-1) #define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1) #define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
#define digitalPinHasPWM(p) (p < 34) #define digitalPinHasPWM(p) (p < 34)
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#define NUM_DIGITAL_PINS 48 #define NUM_DIGITAL_PINS 48
#define NUM_ANALOG_INPUTS 20 #define NUM_ANALOG_INPUTS 20
#define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(p)]):-1) #define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1) #define digitalPinToInterrupt(p) (((p)<48)?(p):-1)
#define digitalPinHasPWM(p) (p < 46) #define digitalPinHasPWM(p) (p < 46)
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#define NUM_DIGITAL_PINS 48 #define NUM_DIGITAL_PINS 48
#define NUM_ANALOG_INPUTS 20 #define NUM_ANALOG_INPUTS 20
#define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(p)]):-1) #define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1) #define digitalPinToInterrupt(p) (((p)<48)?(p):-1)
#define digitalPinHasPWM(p) (p < 46) #define digitalPinHasPWM(p) (p < 46)
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
#define NUM_DIGITAL_PINS 20 #define NUM_DIGITAL_PINS 20
#define NUM_ANALOG_INPUTS 16 #define NUM_ANALOG_INPUTS 16
#define analogInputToDigitalPin(p) (((p) < 20) ? (esp32_adc2gpio[(p)]) : -1) #define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
#define digitalPinToInterrupt(p) (((p) < 40) ? (p) : -1) #define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
#define digitalPinHasPWM(p) (p < 34) #define digitalPinHasPWM(p) (p<34)
static const uint8_t TX = 1; static const uint8_t TX = 1;
static const uint8_t RX = 3; static const uint8_t RX = 3;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#define NUM_DIGITAL_PINS 21 #define NUM_DIGITAL_PINS 21
#define NUM_ANALOG_INPUTS 13 #define NUM_ANALOG_INPUTS 13
#define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(p)]):-1) #define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1) #define digitalPinToInterrupt(p) (((p)<48)?(p):-1)
#define digitalPinHasPWM(p) (p < 46) #define digitalPinHasPWM(p) (p < 46)
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#define NUM_DIGITAL_PINS 27 #define NUM_DIGITAL_PINS 27
#define NUM_ANALOG_INPUTS 14 #define NUM_ANALOG_INPUTS 14
#define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(p)]):-1) #define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1) #define digitalPinToInterrupt(p) (((p)<48)?(p):-1)
#define digitalPinHasPWM(p) (p < 46) #define digitalPinHasPWM(p) (p < 46)
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#define NUM_DIGITAL_PINS 48 #define NUM_DIGITAL_PINS 48
#define NUM_ANALOG_INPUTS 20 #define NUM_ANALOG_INPUTS 20
#define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(p)]):-1) #define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1) #define digitalPinToInterrupt(p) (((p)<48)?(p):-1)
#define digitalPinHasPWM(p) (p < 46) #define digitalPinHasPWM(p) (p < 46)
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#define NUM_DIGITAL_PINS 17 #define NUM_DIGITAL_PINS 17
#define NUM_ANALOG_INPUTS 9 #define NUM_ANALOG_INPUTS 9
#define analogInputToDigitalPin(p) (((p)<20)?(esp32_adc2gpio[(p)]):-1) #define analogInputToDigitalPin(p) (((p)<20)?(analogChannelToDigitalPin(p)):-1)
#define digitalPinToInterrupt(p) (((p)<48)?(p):-1) #define digitalPinToInterrupt(p) (((p)<48)?(p):-1)
#define digitalPinHasPWM(p) (p < 46) #define digitalPinHasPWM(p) (p < 46)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment