diff --git a/Adafruit_NeoPixel.cpp b/Adafruit_NeoPixel.cpp index 39f0b11..9c5a4bc 100644 --- a/Adafruit_NeoPixel.cpp +++ b/Adafruit_NeoPixel.cpp @@ -2852,7 +2852,7 @@ if(is800KHz) { // ToDo! } #endif -#elif defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_ARDUINO_CORE_STM32) +#elif defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_ARDUINO_CORE_STM32) || defined(_PY32_DEF_) uint8_t *p = pixels, *end = p + numBytes, pix = *p++, mask = 0x80; uint32_t cyc; uint32_t saveLoad = SysTick->LOAD, saveVal = SysTick->VAL; @@ -3298,6 +3298,9 @@ void Adafruit_NeoPixel::setPin(int16_t p) { #if defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_ARDUINO_CORE_STM32) gpioPort = digitalPinToPort(p); gpioPin = STM_LL_GPIO_PIN(digitalPinToPinName(p)); +#elif defined(_PY32_DEF_) + gpioPort = digitalPinToPort(p); + gpioPin = PY32_LL_GPIO_PIN(digitalPinToPinName(p)); #elif defined(ARDUINO_ARCH_CH32) PinName const pin_name = digitalPinToPinName(pin); gpioPort = get_GPIO_Port(CH_PORT(pin_name)); diff --git a/Adafruit_NeoPixel.h b/Adafruit_NeoPixel.h index 18fabbf..97be3fa 100644 --- a/Adafruit_NeoPixel.h +++ b/Adafruit_NeoPixel.h @@ -398,7 +398,7 @@ class Adafruit_NeoPixel { volatile uint8_t *port; ///< Output PORT register uint8_t pinMask; ///< Output PORT bitmask #endif -#if defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_ARDUINO_CORE_STM32) || defined(ARDUINO_ARCH_CH32) +#if defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_ARCH_ARDUINO_CORE_STM32) || defined(ARDUINO_ARCH_CH32) || defined(_PY32_DEF_) GPIO_TypeDef *gpioPort; ///< Output GPIO PORT uint32_t gpioPin; ///< Output GPIO PIN #endif