Skip to content

Commit 82cd9e2

Browse files
author
whitequark
committedJan 25, 2017
ksupport: fix I2C function signatures.
1 parent 58a0e4c commit 82cd9e2

File tree

1 file changed

+3
-3
lines changed
  • artiq/firmware/libksupport

1 file changed

+3
-3
lines changed
 

Diff for: ‎artiq/firmware/libksupport/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -248,14 +248,14 @@ extern fn i2c_stop(busno: i32) {
248248
send(&I2CStopRequest { busno: busno as u8 });
249249
}
250250

251-
extern fn i2c_write(busno: i32, data: i8) -> bool {
251+
extern fn i2c_write(busno: i32, data: i32) -> bool {
252252
send(&I2CWriteRequest { busno: busno as u8, data: data as u8 });
253253
recv!(&I2CWriteReply { ack } => ack)
254254
}
255255

256-
extern fn i2c_read(busno: i32, ack: bool) -> i8 {
256+
extern fn i2c_read(busno: i32, ack: bool) -> i32 {
257257
send(&I2CReadRequest { busno: busno as u8, ack: ack });
258-
recv!(&I2CReadReply { data } => data) as i8
258+
recv!(&I2CReadReply { data } => data) as i32
259259
}
260260

261261
unsafe fn attribute_writeback(typeinfo: *const ()) {

0 commit comments

Comments
 (0)
Please sign in to comment.