Skip to content

Commit a0419ad

Browse files
committed
move board setting to end for pull request later
1 parent d7f77c7 commit a0419ad

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

libraries/Firmata/Boards.h

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -331,22 +331,6 @@ writePort(port, value, bitmask): Write an 8 bit port.
331331
#define PIN_TO_PWM(p) PIN_TO_DIGITAL(p)
332332
#define PIN_TO_SERVO(p) (p)
333333

334-
#elif defined(ARDUINO_NRF52_FEATHER)
335-
#define TOTAL_ANALOG_PINS NUM_ANALOG_INPUTS
336-
#define TOTAL_PINS 32
337-
#define VERSION_BLINK_PIN LED_BUILTIN
338-
#define IS_PIN_DIGITAL(p) ((p) >= 2 && (p) < 32)
339-
#define IS_PIN_ANALOG(p) ((p) == PIN_A0 || (p) == PIN_A1 || (p) == PIN_A2 || (p) == PIN_A3 || (p) == PIN_A4 || (p) == PIN_A5 || (p) == PIN_A6 || (p) == PIN_A7)
340-
#define IS_PIN_PWM(p) digitalPinHasPWM(p)
341-
#define IS_PIN_SERVO(p) IS_PIN_DIGITAL(p)
342-
#define IS_PIN_I2C(p) ((p) == PIN_WIRE_SDA || (p) == PIN_WIRE_SCL)
343-
#define IS_PIN_SPI(p) ((p) == SS || (p)== MOSI || (p) == MISO || (p == SCK))
344-
#define IS_PIN_SERIAL(p) ((p) == PIN_SERIAL_RX || (p) == PIN_SERIAL_TX)
345-
#define PIN_TO_DIGITAL(p) (p)
346-
#define PIN_TO_ANALOG(p) (p)
347-
#define PIN_TO_PWM(p) (p)
348-
#define PIN_TO_SERVO(p) (p)
349-
350334

351335
// Arduino 101
352336
#elif defined(_VARIANT_ARDUINO_101_X_)
@@ -797,6 +781,23 @@ writePort(port, value, bitmask): Write an 8 bit port.
797781
#define PIN_TO_SERVO(p) (p)
798782
#define DEFAULT_PWM_RESOLUTION 10
799783

784+
// Adafruit nrf52 boards
785+
#elif defined(ARDUINO_NRF52_FEATHER)
786+
#define TOTAL_ANALOG_PINS NUM_ANALOG_INPUTS
787+
#define TOTAL_PINS 32
788+
#define VERSION_BLINK_PIN LED_BUILTIN
789+
#define IS_PIN_DIGITAL(p) ((p) >= 2 && (p) < 32)
790+
#define IS_PIN_ANALOG(p) ((p) == PIN_A0 || (p) == PIN_A1 || (p) == PIN_A2 || (p) == PIN_A3 || (p) == PIN_A4 || (p) == PIN_A5 || (p) == PIN_A6 || (p) == PIN_A7)
791+
#define IS_PIN_PWM(p) digitalPinHasPWM(p)
792+
#define IS_PIN_SERVO(p) IS_PIN_DIGITAL(p)
793+
#define IS_PIN_I2C(p) ((p) == PIN_WIRE_SDA || (p) == PIN_WIRE_SCL)
794+
#define IS_PIN_SPI(p) ((p) == SS || (p)== MOSI || (p) == MISO || (p == SCK))
795+
#define IS_PIN_SERIAL(p) ((p) == PIN_SERIAL_RX || (p) == PIN_SERIAL_TX)
796+
#define PIN_TO_DIGITAL(p) (p)
797+
#define PIN_TO_ANALOG(p) (p)
798+
#define PIN_TO_PWM(p) (p)
799+
#define PIN_TO_SERVO(p) (p)
800+
800801

801802
// anything else
802803
#else

0 commit comments

Comments
 (0)