JeremyGrosser / rp2040_hal

Ada drivers for the Raspberry Pi RP2040 SoC
https://pico-doc.synack.me/
BSD 3-Clause "New" or "Revised" License
38 stars 11 forks source link

RP.PIO.WS2812: Do not enable/reset the PIO at init #40

Closed Fabien-Chouteau closed 2 years ago

Fabien-Chouteau commented 2 years ago

The RP.PIO.Enable procedure actually does a reset of the PIO device, Therefore if we call it during RP.PIO.WS2812.Initialize the configuration of other state machines of the given PIO will also be reset.

If one tries, for instance, to have two WS2812 strips on the same PIO but different state machines, init of the second strip will reset the configuration for the first. This means the first strip will never work.