Turn on the built-in LED when software starts up
This commit is contained in:
parent
291663d4a3
commit
37c7e04820
|
@ -8,7 +8,7 @@ use az::*;
|
||||||
use core::cell::RefCell;
|
use core::cell::RefCell;
|
||||||
use cortex_m::delay::Delay;
|
use cortex_m::delay::Delay;
|
||||||
use embedded_alloc::Heap;
|
use embedded_alloc::Heap;
|
||||||
use embedded_hal::{blocking::spi::Write, digital::v2::InputPin};
|
use embedded_hal::{blocking::spi::Write, digital::v2::InputPin, digital::v2::OutputPin};
|
||||||
use fixed::types::I16F16;
|
use fixed::types::I16F16;
|
||||||
use fugit::RateExtU32;
|
use fugit::RateExtU32;
|
||||||
use lights_core::{App, BodyPattern, DashboardPattern, Event, Instant, FPS, UI};
|
use lights_core::{App, BodyPattern, DashboardPattern, Event, Instant, FPS, UI};
|
||||||
|
@ -209,6 +209,7 @@ fn main() -> ! {
|
||||||
let mut app = App::new(Box::new(ui));
|
let mut app = App::new(Box::new(ui));
|
||||||
|
|
||||||
let mut led_pin = pins.led.into_push_pull_output();
|
let mut led_pin = pins.led.into_push_pull_output();
|
||||||
|
led_pin.set_high();
|
||||||
|
|
||||||
let mut time = Instant::default();
|
let mut time = Instant::default();
|
||||||
let delay_ms = 1000 / (FPS as u32);
|
let delay_ms = 1000 / (FPS as u32);
|
||||||
|
|
Loading…
Reference in New Issue