led: Fix crashes from PWM callbacks
Previously, starting a Rainbow() or Pulse() pattern multiple times on
one LED or switching between patterns on the two LEDs crashed the
device.
Update the PicoPwmGpio implementation so calling SetCallback() doesn't
require clearing callbacks on other instances first.
Change-Id: Idcf318cceb2476eddce8e26553ce16e0ad4f5c2b
Reviewed-on: https://pigweed-internal-review.git.corp.google.com/c/pigweed/showcase/rp2/+/73674
Commit-Queue: Auto-Submit <auto-submit@pw-internal-service-accounts.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
Reviewed-by: Keir Mierle <keir@google.com>
Presubmit-Verified: CQ Bot Account <pigweed-internal-scoped@luci-project-accounts.iam.gserviceaccount.com>
10 files changed