there are some problems to implemet the IO Mux interrupt handler

This commit is contained in:
Philipp_EndevourOS
2025-09-09 16:50:14 +02:00
parent d96b3ed11a
commit adcbe87bd7
2 changed files with 57 additions and 16 deletions

View File

@@ -12,7 +12,7 @@ use crate::{FEEDBACK_STATE, init};
#[derive(Copy, Clone, Debug)]
pub enum FeedbackState {
Ack,
Nak,
Nack,
Error,
Startup,
WIFI,
@@ -37,7 +37,7 @@ pub async fn feedback_task(mut led: SmartLedsAdapterAsync<ConstChannelAccess<esp
buzzer.set_low();
Timer::after(Duration::from_millis(50)).await;
}
FeedbackState::Nak => {
FeedbackState::Nack => {
led.write(brightness([YELLOW; init::hardware::NUM_LEDS].into_iter(), LED_LEVEL)).await.unwrap();
buzzer.set_high();
Timer::after(Duration::from_millis(100)).await;
@@ -77,7 +77,7 @@ pub async fn feedback_task(mut led: SmartLedsAdapterAsync<ConstChannelAccess<esp
led.write(brightness([BLUE; init::hardware::NUM_LEDS].into_iter(), LED_LEVEL)).await.unwrap();
}
FeedbackState::Idle => {
// Do nothing
led.write(brightness([GREEN; init::hardware::NUM_LEDS].into_iter(), LED_LEVEL)).await.unwrap();
}
};
debug!("Feedback state: {:?}", feedback_state);