mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-20 09:03:28 +00:00
Merge pull request #660 from betrusted-io/sam.i2c-fix
add back in the reading part of `i2c_read`
This commit is contained in:
commit
63b18ec42d
1 changed files with 1 additions and 0 deletions
|
|
@ -49,6 +49,7 @@ impl I2cApi for I2c {
|
||||||
if result.transactions[0].result == I2cResult::InternalError {
|
if result.transactions[0].result == I2cResult::InternalError {
|
||||||
Err(xous::Error::InternalError)
|
Err(xous::Error::InternalError)
|
||||||
} else {
|
} else {
|
||||||
|
buf.copy_from_slice(&result.transactions[0].data);
|
||||||
Ok(result.transactions[0].result)
|
Ok(result.transactions[0].result)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue