main: load config from eeprom on boot

This commit is contained in:
Astro 2020-09-24 23:08:42 +02:00
parent 8d70c03520
commit a1ad9b2456

View File

@ -124,6 +124,9 @@ fn main() -> ! {
usb::State::setup(usb); usb::State::setup(usb);
let mut channels = Channels::new(pins); let mut channels = Channels::new(pins);
let _ = Config::load(&mut eeprom)
.map(|config| config.apply(&mut channels))
.map_err(|e| warn!("error loading config: {:?}", e));
// EEPROM ships with a read-only EUI-48 identifier // EEPROM ships with a read-only EUI-48 identifier
let mut eui48 = [0; 6]; let mut eui48 = [0; 6];