Add protocol for serial library to implement.
This commit is contained in:
8
Sources/SwiftRPLidar/LidarSerial.swift
Normal file
8
Sources/SwiftRPLidar/LidarSerial.swift
Normal file
@@ -0,0 +1,8 @@
|
||||
protocol LidarSerial {
|
||||
var dtr: Bool {get set};
|
||||
var inWaiting: Int {get};
|
||||
func closePort() -> Void;
|
||||
func openPort() -> Void;
|
||||
readData(ofLength: Int) throws -> Void;
|
||||
writeData(_ data: Data) throws -> Void;
|
||||
}
|
||||
Reference in New Issue
Block a user