forked from M-Labs/zynq-rs
1
0
Fork 0

i2c: fix error messages

This commit is contained in:
Sebastien Bourdeauducq 2021-06-25 16:23:50 +08:00
parent 8dbe2cf9f3
commit d18c77c0eb
1 changed files with 2 additions and 2 deletions

View File

@ -133,7 +133,7 @@ impl I2c {
return Err("SDA is stuck low and doesn't get unstuck");
}
if !self.scl_i() {
return Err("SCL is stuck low and doesn't get unstuck");
return Err("SCL is stuck low");
}
// postcondition: SCL and SDA high
Ok(())
@ -142,7 +142,7 @@ impl I2c {
pub fn start(&mut self) -> Result<(), &'static str> {
// precondition: SCL and SDA high
if !self.scl_i() {
return Err("SCL is stuck low and doesn't get unstuck");
return Err("SCL is stuck low");
}
if !self.sda_i() {
return Err("SDA arbitration lost");