modules/blinky: Enable the PolychromeLed in Blinky

Also assert that the LED has been enabled in PolychromeLed::TurnOn().

Change-Id: Ibbe64bbc148b9c25dd7f62b09e2ab6d8b07f9659
Reviewed-on: https://pigweed-internal-review.git.corp.google.com/c/pigweed/showcase/rp2/+/73552
Commit-Queue: Auto-Submit <auto-submit@pw-internal-service-accounts.iam.gserviceaccount.com>
Reviewed-by: Keir Mierle <keir@google.com>
Presubmit-Verified: CQ Bot Account <pigweed-internal-scoped@luci-project-accounts.iam.gserviceaccount.com>
Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com>
diff --git a/modules/blinky/blinky.cc b/modules/blinky/blinky.cc
index 690af19..b1adcaa 100644
--- a/modules/blinky/blinky.cc
+++ b/modules/blinky/blinky.cc
@@ -74,6 +74,7 @@
   monochrome_led_->TurnOff();
 
   polychrome_led_ = &polychrome_led;
+  polychrome_led_->Enable();
   polychrome_led_->TurnOff();
 }
 
diff --git a/modules/blinky/blinky.h b/modules/blinky/blinky.h
index e250bd4..d35bcb1 100644
--- a/modules/blinky/blinky.h
+++ b/modules/blinky/blinky.h
@@ -29,7 +29,7 @@
 
 namespace sense {
 
-/// Simple component that blink the on-board LED.
+/// Simple component that blinks the on-board LED.
 class Blinky final {
  public:
   static constexpr uint32_t kDefaultIntervalMs = 1000;
diff --git a/modules/led/BUILD.bazel b/modules/led/BUILD.bazel
index be7a79a..ae5e7ea 100644
--- a/modules/led/BUILD.bazel
+++ b/modules/led/BUILD.bazel
@@ -53,7 +53,10 @@
     name = "polychrome_led",
     srcs = ["polychrome_led.cc"],
     hdrs = ["polychrome_led.h"],
-    implementation_deps = ["@pigweed//pw_log"],
+    implementation_deps = [
+        "@pigweed//pw_assert",
+        "@pigweed//pw_log",
+    ],
     deps = ["//modules/pwm:digital_out"],
 )
 
diff --git a/modules/led/polychrome_led.cc b/modules/led/polychrome_led.cc
index 2ec8ef9..e0fce89 100644
--- a/modules/led/polychrome_led.cc
+++ b/modules/led/polychrome_led.cc
@@ -16,6 +16,7 @@
 
 #include "modules/led/polychrome_led.h"
 
+#include "pw_assert/check.h"
 #include "pw_log/log.h"
 
 namespace sense {
@@ -45,6 +46,8 @@
 }
 
 void PolychromeLed::TurnOn() {
+  PW_DCHECK_INT_NE(
+      state_, kDisabled, "Cannot turn on the LED until Enable() is called");
   if (state_ == kOff) {
     Update();
     state_ = kOn;