Added SetStopBits (linux only)

This commit is contained in:
Cristian Maglie
2014-12-14 18:50:29 +01:00
parent 3351cd50e0
commit f84dc80d3e
3 changed files with 28 additions and 1 deletions

View File

@@ -36,7 +36,9 @@ func ExampleCommunication() {
if err := port.SetDataBits(8); err != nil {
log.Fatal(err)
}
if err := port.SetStopBits(serial.STOPBITS_ONE); err != nil {
log.Fatal(err)
}
n, err := port.Write([]byte("10,20,30\n\r"))
if err != nil {
log.Fatal(err)