Skip to content

[STM32] Fix version checking #443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ writePort(port, value, bitmask): Write an 8 bit port.
#endif
// PIN_SERIALY_RX/TX defined in the variant.h
#define IS_PIN_DIGITAL(p) (digitalPinIsValid(p) && !pinIsSerial(p))
#if !defined(STM32_CORE_VERSION) || (STM32_CORE_VERSION <= 0x01080000)
#if !defined(STM32_CORE_VERSION) || (STM32_CORE_VERSION < 0x01080000)
#define IS_PIN_ANALOG(p) ((p >= A0) && (p < (A0 + TOTAL_ANALOG_PINS)) && !pinIsSerial(p))
#else
#define IS_PIN_ANALOG(p) (pinIsAnalogInput(p) && !pinIsSerial(p))
Expand All @@ -871,7 +871,7 @@ writePort(port, value, bitmask): Write an 8 bit port.
#define IS_PIN_INTERRUPT(p) (IS_PIN_DIGITAL(p) && (digitalPinToInterrupt(p) > NOT_AN_INTERRUPT)))
#define IS_PIN_SERIAL(p) (digitalPinHasSerial(p) && !pinIsSerial(p))
#define PIN_TO_DIGITAL(p) (p)
#if !defined(STM32_CORE_VERSION) || (STM32_CORE_VERSION <= 0x01080000)
#if !defined(STM32_CORE_VERSION) || (STM32_CORE_VERSION < 0x01080000)
#define PIN_TO_ANALOG(p) (p-A0)
#else
#define PIN_TO_ANALOG(p) (digitalPinToAnalogInput(p))
Expand Down