Fix linux compilation
This commit is contained in:
@@ -383,13 +383,15 @@ public class SerialPort {
|
||||
}
|
||||
dtrState = value
|
||||
var flags = TIOCM_DTR
|
||||
ioctl(fileDescriptor, dtrState ? TIOCMBIS : TIOCMBIC, &flags)
|
||||
if(ioctl(fileDescriptor, UInt(dtrState ? TIOCMBIS : TIOCMBIC), &flags) != 0){
|
||||
print("Failed to apply dtr")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public var inWaiting: Int {
|
||||
get{
|
||||
return Int(ioctl(fileDescriptor!, FIONREAD))
|
||||
return Int(ioctl(fileDescriptor!, UInt(FIONREAD)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user