mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
Check ESP8285 at runtime (#8604)
* esp_is_8285() at runtime * less code with less statics, just read again
This commit is contained in:
@ -30,7 +30,10 @@
|
||||
#define NUM_DIGITAL_PINS 17
|
||||
#define NUM_ANALOG_INPUTS 1
|
||||
|
||||
#define isFlashInterfacePin(p) ((p) >= 6 && (p) <= 11)
|
||||
#define isFlashInterfacePin(p)\
|
||||
(esp_is_8285()\
|
||||
? ((p) == 6 || (p) == 7 || (p) == 8 || (p) == 11)\
|
||||
: ((p) >= 6 && (p) <= 11))
|
||||
|
||||
#define analogInputToDigitalPin(p) ((p > 0) ? NOT_A_PIN : 0)
|
||||
#define digitalPinToInterrupt(p) (((p) < EXTERNAL_NUM_INTERRUPTS)? (p) : NOT_AN_INTERRUPT)
|
||||
|
Reference in New Issue
Block a user