,
+ blink: bool,
+}
+
+impl {
+ pub fn new(pin: P, low_active: bool) -> Self {
+ Self {
+ pin: OutputController::new(pin, low_active),
+ blink: false,
+ }
+ }
+
+ async fn on_dfu_status_event(&mut self, event: DfuStatusEvent) {
+ match *event {
+ DfuStatus::Idle | DfuStatus::Finished => {
+ self.blink = false;
+ self.pin.deactivate();
+ }
+ DfuStatus::Started => {
+ self.blink = false;
+ self.pin.activate();
+ }
+ DfuStatus::Downloading => self.pin.toggle(),
+ DfuStatus::Error => {
+ self.blink = false;
+ self.pin.activate();
+ }
+ DfuStatus::LockWaiting => {
+ self.blink = false;
+ self.pin.activate();
+ }
+ DfuStatus::LockUnlocked => {
+ self.blink = true;
+ }
+ }
+ }
+
+ async fn poll(&mut self) {
+ if self.blink {
+ self.pin.toggle();
+ }
+ }
+}
diff --git a/rmk/src/processor/builtin/mod.rs b/rmk/src/processor/builtin/mod.rs
index ddd0d359c..00cf096ef 100644
--- a/rmk/src/processor/builtin/mod.rs
+++ b/rmk/src/processor/builtin/mod.rs
@@ -4,5 +4,7 @@
#[cfg(feature = "_ble")]
pub mod battery_led;
+#[cfg(feature = "dfu")]
+pub mod dfu_led;
pub mod led_indicator;
pub mod wpm;
diff --git a/rmk/src/storage/mod.rs b/rmk/src/storage/mod.rs
index 2beb18a81..fa2e669d3 100644
--- a/rmk/src/storage/mod.rs
+++ b/rmk/src/storage/mod.rs
@@ -421,16 +421,17 @@ impl