forked from Makuna/NeoPixelBus
STM32WLE5xx support (#867)
This commit is contained in:
@@ -560,7 +560,7 @@ typedef NeoArm400KbpsMethod NeoArmApa106Method;
|
|||||||
typedef NeoArmWs2805Method NeoArmWs2814Method;
|
typedef NeoArmWs2805Method NeoArmWs2814Method;
|
||||||
typedef NeoArmTm1814InvertedMethod NeoArmTm1914InvertedMethod;
|
typedef NeoArmTm1814InvertedMethod NeoArmTm1914InvertedMethod;
|
||||||
|
|
||||||
#elif defined(ARDUINO_STM32_FEATHER) || defined(ARDUINO_ARCH_STM32L4) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32F1)// FEATHER WICED (120MHz)
|
#elif defined(ARDUINO_ARCH_STM32) || defined(ARDUINO_STM32_FEATHER) || defined(ARDUINO_ARCH_STM32L4) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32F1)// FEATHER WICED (120MHz)
|
||||||
|
|
||||||
class NeoArmStm32SpeedProps800KbpsBase
|
class NeoArmStm32SpeedProps800KbpsBase
|
||||||
{
|
{
|
||||||
@@ -705,7 +705,21 @@ public:
|
|||||||
volatile uint32_t* set = &(GPIO->BRR);
|
volatile uint32_t* set = &(GPIO->BRR);
|
||||||
volatile uint32_t* clr = &(GPIO->BSRR);
|
volatile uint32_t* clr = &(GPIO->BSRR);
|
||||||
|
|
||||||
|
#elif defined(STM32WLE5xx)
|
||||||
|
const unsigned long GPIO_BASE_ADDR = 0x48000000UL;
|
||||||
|
const unsigned long GPIO_BASE_OFFSET = 0x00000400UL;
|
||||||
|
const uint32_t GPIO_NUMBER = 16;
|
||||||
|
|
||||||
|
uint32_t pinMask = 1 << (pin % GPIO_NUMBER);
|
||||||
|
|
||||||
|
GPIO_TypeDef* GPIO = reinterpret_cast<GPIO_TypeDef*>(GPIO_BASE_ADDR + ((pin / GPIO_NUMBER) * GPIO_BASE_OFFSET));
|
||||||
|
|
||||||
|
volatile uint32_t* set = &(GPIO->BRR);
|
||||||
|
volatile uint32_t* clr = &(GPIO->BSRR);
|
||||||
|
#else
|
||||||
|
#error "SPECIFIC STM32 CHIP NOT ACCOUNTED FOR"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if (p & bitMask)
|
if (p & bitMask)
|
||||||
|
Reference in New Issue
Block a user