From 2ac7eedec18bd04a52aa438b1bb009726a81be67 Mon Sep 17 00:00:00 2001 From: morgan Date: Wed, 30 Aug 2023 15:33:44 +0800 Subject: [PATCH] firmware: fix compilation without virtual LEDs Co-authored-by: morgan Co-committed-by: morgan --- src/libboard_artiq/src/io_expander.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libboard_artiq/src/io_expander.rs b/src/libboard_artiq/src/io_expander.rs index f9d79ac..e7f659d 100644 --- a/src/libboard_artiq/src/io_expander.rs +++ b/src/libboard_artiq/src/io_expander.rs @@ -152,6 +152,7 @@ impl IoExpander { } pub fn service(&mut self, i2c: &mut i2c::I2c) -> Result<(), &'static str> { + #[cfg(has_virtual_leds)] for (led, port, bit) in self.virtual_led_mapping.iter() { let level = unsafe { csr::virtual_leds::status_read() >> led & 1 }; self.set(*port, *bit, level != 0);