fix serial

This commit is contained in:
ginuerzh
2023-10-15 23:55:52 +08:00
parent 497915f465
commit 5ab729b166
9 changed files with 755 additions and 71 deletions

View File

@ -0,0 +1,28 @@
//go:build !windows && !linux
// +build !windows,!linux
package serial
import (
"errors"
"time"
)
func openPort(name string, baud int, databits byte, parity Parity, stopbits StopBits, readTimeout time.Duration) (p *Port, err error) {
return nil, errors.New("unsupported platform")
}
type Port struct {
}
func (p *Port) Read(b []byte) (n int, err error) {
return
}
func (p *Port) Write(b []byte) (n int, err error) {
return
}
func (p *Port) Close() (err error) {
return
}