diff --git a/Sources/SwiftRPLidar/LidarSerial.swift b/Sources/SwiftRPLidar/LidarSerial.swift index 1aa44b3..3fc9d57 100644 --- a/Sources/SwiftRPLidar/LidarSerial.swift +++ b/Sources/SwiftRPLidar/LidarSerial.swift @@ -3,8 +3,8 @@ import Foundation public protocol LidarSerial { var dtr: Bool {get set}; var inWaiting: Int {get}; - func closePort() -> Void; - func openPort() -> Void; + func closePort(); + func openPort() throws; func readData(ofLength: Int) throws -> Data; - func writeData(_ data: Data) throws -> Void; + func writeData(_ data: Data) throws -> Int; }