forked from M-Labs/artiq
1
0
Fork 0

libboard_misoc: fix !has_i2c

This commit is contained in:
Sebastien Bourdeauducq 2019-11-27 21:04:28 +08:00
parent e0687b77f5
commit 449d2c4f08
1 changed files with 2 additions and 2 deletions

View File

@ -194,13 +194,13 @@ mod imp {
#[cfg(not(has_i2c))] #[cfg(not(has_i2c))]
mod imp { mod imp {
const NO_I2C: &'static str = "No I2C support on this platform"; 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 start(_busno: u8) -> Result<(), &'static str> { Err(NO_I2C) }
pub fn restart(_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 stop(_busno: u8) -> Result<(), &'static str> { Err(NO_I2C) }
pub fn write(_busno: u8, _data: u8) -> Result<bool, &'static str> { Err(NO_I2C) } pub fn write(_busno: u8, _data: u8) -> Result<bool, &'static str> { Err(NO_I2C) }
pub fn read(_busno: u8, _ack: bool) -> Result<u8, &'static str> { Err(NO_I2C) } pub fn read(_busno: u8, _ack: bool) -> Result<u8, &'static str> { 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::*; pub use self::imp::*;