forked from M-Labs/artiq
1
0
Fork 0

io_expander: initialize before service

This commit is contained in:
occheung 2023-10-13 16:43:06 -07:00 committed by Sébastien Bourdeauducq
parent f7abc156cb
commit 363f7327f1
1 changed files with 2 additions and 1 deletions

View File

@ -632,6 +632,7 @@ pub extern fn main() -> i32 {
#[cfg(soc_platform = "efc")] #[cfg(soc_platform = "efc")]
{ {
io_expander = board_misoc::io_expander::IoExpander::new().unwrap(); io_expander = board_misoc::io_expander::IoExpander::new().unwrap();
io_expander.init().expect("I2C I/O expander initialization failed");
// Enable LEDs // Enable LEDs
io_expander.set_oe(0, 1 << 5 | 1 << 6 | 1 << 7).unwrap(); io_expander.set_oe(0, 1 << 5 | 1 << 6 | 1 << 7).unwrap();