mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2025-02-22 00:36:04 +01:00
digitalPinToPort back from arduino core
This commit is contained in:
parent
f254643a1d
commit
c458e98cd3
@ -530,7 +530,8 @@ void MotorDriver::getFastPin(const FSH* type,int pin, bool input, FASTPIN & res
|
|||||||
#elif defined(ARDUINO_ARCH_STM32)
|
#elif defined(ARDUINO_ARCH_STM32)
|
||||||
GPIO_TypeDef *port = digitalPinToPort(pin);
|
GPIO_TypeDef *port = digitalPinToPort(pin);
|
||||||
#elif defined(ARDUINO_GIGA)
|
#elif defined(ARDUINO_GIGA)
|
||||||
auto * port = ((GPIO_TypeDef *)(GPIOA_BASE + (GPIOB_BASE - GPIOA_BASE) * (digitalPinToPinName(pin) >> 4)));
|
//auto * port = ((GPIO_TypeDef *)(GPIOA_BASE + (GPIOB_BASE - GPIOA_BASE) * (digitalPinToPinName(pin) >> 4)));
|
||||||
|
GPIO_TypeDef *port = (GPIO_TypeDef *)digitalPinToPort(pin);
|
||||||
#else
|
#else
|
||||||
uint8_t port = digitalPinToPort(pin);
|
uint8_t port = digitalPinToPort(pin);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user