1 parent 1df0b5f commit 08c3cbbCopy full SHA for 08c3cbb
1 file changed
Sources/I2C.swift
@@ -257,7 +257,7 @@ public final class SysFSI2C: I2CInterface {
257
public func readRaw(_ address: Int, length: Int) -> [UInt8] {
258
var buf: [UInt8] = [UInt8](repeating:0, count: length)
259
260
- let i2cStatus = ioctl( Int32( i2cId ), 0x0703, CInt( address ) )
+ let i2cStatus = ioctl( fd, 0x0703, CInt( address ) )
261
262
if i2cStatus != 0 {
263
print( "ioctl failed" )
@@ -278,7 +278,7 @@ public final class SysFSI2C: I2CInterface {
278
279
setSlaveAddress(address)
280
281
282
283
guard i2cStatus == 0 else { return nil }
284
0 commit comments