Skip to content

Commit 4a70a79

Browse files
committed
smbus_process_block takes a max of 31 bytes
1 parent f6d4b46 commit 4a70a79

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ffi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ pub fn i2c_smbus_write_i2c_block_data(fd: RawFd,
407407
#[inline]
408408
pub fn i2c_smbus_process_call_block(fd: RawFd, register: u8, values: &[u8]) -> Result<Vec<u8>, I2CError> {
409409
let mut data = i2c_smbus_data::empty();
410-
let len: usize = if values.len() > 32 {
411-
32
410+
let len: usize = if values.len() > 31 {
411+
31
412412
} else {
413413
values.len()
414414
};

0 commit comments

Comments
 (0)