From 82cd9e27f7620c5ef7740740fba6e9b22ccb1756 Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 25 Jan 2017 02:11:32 +0000 Subject: [PATCH] ksupport: fix I2C function signatures. --- artiq/firmware/libksupport/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artiq/firmware/libksupport/lib.rs b/artiq/firmware/libksupport/lib.rs index e986daf85..d4a56c2b0 100644 --- a/artiq/firmware/libksupport/lib.rs +++ b/artiq/firmware/libksupport/lib.rs @@ -248,14 +248,14 @@ extern fn i2c_stop(busno: i32) { send(&I2CStopRequest { busno: busno as u8 }); } -extern fn i2c_write(busno: i32, data: i8) -> bool { +extern fn i2c_write(busno: i32, data: i32) -> bool { send(&I2CWriteRequest { busno: busno as u8, data: data as u8 }); recv!(&I2CWriteReply { ack } => ack) } -extern fn i2c_read(busno: i32, ack: bool) -> i8 { +extern fn i2c_read(busno: i32, ack: bool) -> i32 { send(&I2CReadRequest { busno: busno as u8, ack: ack }); - recv!(&I2CReadReply { data } => data) as i8 + recv!(&I2CReadReply { data } => data) as i32 } unsafe fn attribute_writeback(typeinfo: *const ()) {