From 281133ef6e5eea02cdf3c618006680ba94ee928f Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 27 Nov 2019 21:04:28 +0800 Subject: [PATCH] libboard_misoc: fix !has_i2c --- artiq/firmware/libboard_misoc/i2c.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/firmware/libboard_misoc/i2c.rs b/artiq/firmware/libboard_misoc/i2c.rs index b816c4921..acade0c24 100644 --- a/artiq/firmware/libboard_misoc/i2c.rs +++ b/artiq/firmware/libboard_misoc/i2c.rs @@ -194,13 +194,13 @@ mod imp { #[cfg(not(has_i2c))] mod imp { const NO_I2C: &'static str = "No I2C support on this platform"; - pub fn init() { Err(NO_I2C) } + pub fn init() -> Result<(), &'static str> { Err(NO_I2C) } pub fn start(_busno: u8) -> Result<(), &'static str> { Err(NO_I2C) } pub fn restart(_busno: u8) -> Result<(), &'static str> { Err(NO_I2C) } pub fn stop(_busno: u8) -> Result<(), &'static str> { Err(NO_I2C) } pub fn write(_busno: u8, _data: u8) -> Result { Err(NO_I2C) } pub fn read(_busno: u8, _ack: bool) -> Result { Err(NO_I2C) } - pub fn pca9548_select(busno: u8, address: u8, channels: u8) -> Result<(), &'static str> { Err(NO_I2C) } + pub fn pca9548_select(_busno: u8, _address: u8, _channels: u8) -> Result<(), &'static str> { Err(NO_I2C) } } pub use self::imp::*;