Skip to content

Commit

Permalink
Fixed typecast for readRaw
Browse files Browse the repository at this point in the history
  • Loading branch information
Craig Altrenburg committed Dec 6, 2021
1 parent bb11412 commit b676d1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/I2C.swift
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public final class SysFSI2C: I2CInterface {

setSlaveAddress(address)

let r = read( i2cId, &buf, length )
let r = read( Int32( i2cId ), &buf, Int( length ) )

if r < 0 {
perror("I2C read failed")
Expand All @@ -273,7 +273,7 @@ public final class SysFSI2C: I2CInterface {

setSlaveAddress(address)

let r = read( i2cId, &buf, length )
let r = read( Int32( i2cId ), &buf, Int( length ) )

if r < 0 { return nil }

Expand Down

0 comments on commit b676d1d

Please sign in to comment.