Skip to content

Commit 568fa81

Browse files
committed
ledmatrix: Read sleep pin and turn off LEDs
Turns LEDs off slowly and on slowly when sleep pin goes low/high. Signed-off-by: Daniel Schaefer <[email protected]>
1 parent ca9791f commit 568fa81

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

ledmatrix/src/main.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,14 @@ fn main() -> ! {
219219
loop {
220220
// TODO: Current hardware revision does not have the sleep pin wired up :(
221221
// Go to sleep if the host is sleeping
222-
let _host_sleeping = sleep.is_low().unwrap();
223-
//handle_sleep(
224-
// host_sleeping,
225-
// &mut state,
226-
// &mut matrix,
227-
// &mut delay,
228-
// &mut led_enable,
229-
//);
222+
let host_sleeping = sleep.is_low().unwrap();
223+
handle_sleep(
224+
host_sleeping,
225+
&mut state,
226+
&mut matrix,
227+
&mut delay,
228+
&mut led_enable,
229+
);
230230

231231
// Handle period display updates. Don't do it too often
232232
if timer.get_counter().ticks() > prev_timer + state.animation_period {

0 commit comments

Comments
 (0)