reformat
This commit is contained in:
+3
-3
@@ -1,10 +1,11 @@
|
|||||||
package utils
|
package utils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/tarm/serial"
|
|
||||||
"io"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/tarm/serial"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -12,7 +13,7 @@ var(
|
|||||||
baudrate int
|
baudrate int
|
||||||
bytesize byte
|
bytesize byte
|
||||||
port *serial.Port
|
port *serial.Port
|
||||||
portOpened bool
|
portOpened = false
|
||||||
)
|
)
|
||||||
|
|
||||||
func OpenPort(device string, baudrate int, bytesize byte) error {
|
func OpenPort(device string, baudrate int, bytesize byte) error {
|
||||||
@@ -45,4 +46,3 @@ func ReadPort() ([]byte, int){
|
|||||||
func IsPortOpen() bool {
|
func IsPortOpen() bool {
|
||||||
return portOpened
|
return portOpened
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user