Skip to content

Commit 71af575

Browse files
committed
config optimizations
- Firmata 2.5.1 or higher required - esp8266/Adruino needs to fix macros digitalPinHasPWM and digitalPinToInterrupt - no wifio board support
1 parent e6a09e5 commit 71af575

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Boards.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -669,13 +669,12 @@ writePort(port, value, bitmask): Write an 8 bit port.
669669
// note: boot mode GPIOs 0, 2 and 15 can be used as outputs, GPIOs 6-11 are in use for flash IO
670670
#elif defined(ESP8266)
671671
#define TOTAL_ANALOG_PINS NUM_ANALOG_INPUTS
672-
#define TOTAL_PINS (NUM_DIGITAL_PINS > A0 + NUM_ANALOG_INPUTS ? NUM_DIGITAL_PINS : A0 + NUM_ANALOG_INPUTS)
673-
#define VERSION_BLINK_PIN LED_BUILTIN
672+
#define TOTAL_PINS A0 + NUM_ANALOG_INPUTS
674673
#define PIN_SERIAL_RX 3
675674
#define PIN_SERIAL_TX 1
676-
#define IS_PIN_DIGITAL(p) (((p) >= 0 && (p) <= 5) || ((p) >= 12 && (p) < (NUM_DIGITAL_PINS > A0 + NUM_ANALOG_INPUTS ? NUM_DIGITAL_PINS : A0)))
675+
#define IS_PIN_DIGITAL(p) (((p) >= 0 && (p) <= 5) || ((p) >= 12 && (p) < A0))
677676
#define IS_PIN_ANALOG(p) ((p) >= A0 && (p) < A0 + NUM_ANALOG_INPUTS)
678-
#define IS_PIN_PWM(p) IS_PIN_DIGITAL(p)
677+
#define IS_PIN_PWM(p) digitalPinHasPWM(p)
679678
#define IS_PIN_SERVO(p) (IS_PIN_DIGITAL(p) && (p) < MAX_SERVOS)
680679
#define IS_PIN_I2C(p) ((p) == SDA || (p) == SCL)
681680
#define IS_PIN_SPI(p) ((p) == SS || (p) == MOSI || (p) == MISO || (p) == SCK)

0 commit comments

Comments
 (0)