Add protocol for serial library to implement.

This commit is contained in:
michaelpivato
2020-07-09 12:22:53 +09:30
parent b79200524f
commit 05ebdbd0a4
2 changed files with 11 additions and 3 deletions

View 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;
}