diff --git a/teensy4/pins_arduino.h b/teensy4/pins_arduino.h index a6d5b32db..f387e4aeb 100644 --- a/teensy4/pins_arduino.h +++ b/teensy4/pins_arduino.h @@ -108,15 +108,15 @@ static const uint8_t SCL = 19; #if defined(__IMXRT1062__) && defined(ARDUINO_TEENSY40) - #define analogInputToDigitalPin(p) (((p) <= 9) ? (p) + 14 : (( ((p) >= 14 && (p) <= 27)) ? (p) : -1)) + #define analogInputToDigitalPin(p) (((p) <= 13) ? (p) + 14 : -1) #define digitalPinHasPWM(p) ((p) <= 15 || (p) == 18 || (p) == 19 || ((p) >= 22 && (p) <= 25) || (p) == 28 || (p) == 29 || ((p) >= 33 && (p) <= 39)) #elif defined(__IMXRT1062__) && defined(ARDUINO_TEENSY41) - #define analogInputToDigitalPin(p) (((p) <= 9) ? (p) + 14 : (( ((p) >= 14 && (p) <= 27)) || ((p) >= 38 && (p) <= 41) ? (p) : -1)) + #define analogInputToDigitalPin(p) (((p) <= 13) ? (p) + 14 : (( ((p) >= 14 && (p) <= 17)) ? (p) + 24 : -1)) #define digitalPinHasPWM(p) ((p) <= 15 || (p) == 18 || (p) == 19 || ((p) >= 22 && (p) <= 25) || (p) == 28 || (p) == 29 || (p) == 33 || (p) == 36 || (p) == 37 || ((p) >= 42 && (p) <= 47) || (p) == 51 || (p) == 54) #elif defined(__IMXRT1062__) && defined(ARDUINO_TEENSY_MICROMOD) - #define analogInputToDigitalPin(p) (((p) <= 9) ? (p) + 14 : (( ((p) >= 14 && (p) <= 27)) ? (p) : -1)) + #define analogInputToDigitalPin(p) (((p) <= 13) ? (p) + 14 : -1) #define digitalPinHasPWM(p) ((p) <= 15 || (p) == 18 || (p) == 19 || ((p) >= 22 && (p) <= 25) || (p) == 28 || (p) == 29 || (p) == 33 || (p) == 40 || (p) == 41 || (p) == 45) #endif #define digitalPinToInterrupt(p) ((p) < NUM_DIGITAL_PINS ? (p) : -1)