Skip to content

Commit e0594d4

Browse files
committed
[STM32] Avoid using non standard constant
AEND is an internal STM32 core constant and should not be used. Replaced by (A0 + TOTAL_ANALOG_PINS) Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
1 parent a939ca1 commit e0594d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Boards.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ writePort(port, value, bitmask): Write an 8 bit port.
788788
#define VERSION_BLINK_PIN LED_BUILTIN
789789
// PIN_SERIALY_RX/TX defined in the variant.h
790790
#define IS_PIN_DIGITAL(p) (digitalPinIsValid(p) && !pinIsSerial(p))
791-
#define IS_PIN_ANALOG(p) ((p >= A0) && (p < AEND) && !pinIsSerial(p))
791+
#define IS_PIN_ANALOG(p) ((p >= A0) && (p < (A0 + TOTAL_ANALOG_PINS)) && !pinIsSerial(p))
792792
#define IS_PIN_PWM(p) (IS_PIN_DIGITAL(p) && digitalPinHasPWM(p))
793793
#define IS_PIN_SERVO(p) IS_PIN_DIGITAL(p)
794794
#define IS_PIN_I2C(p) (IS_PIN_DIGITAL(p) && digitalPinHasI2C(p))

0 commit comments

Comments
 (0)