Added interface methods for RS232 signals

This commit is contained in:
Cristian Maglie
2016-10-29 22:18:24 +02:00
parent f56a50621e
commit 5be0087bd5
4 changed files with 110 additions and 0 deletions

View File

@@ -51,6 +51,18 @@ func (port *unixPort) SetMode(mode *Mode) error {
return port.setTermSettings(settings)
}
func (port *unixPort) SetDTR(dtr bool) error {
return &PortError{}
}
func (port *unixPort) SetRTS(rts bool) error {
return &PortError{}
}
func (port *unixPort) GetModemStatusBits() (*ModemStatusBits, error) {
return nil, &PortError{}
}
func nativeOpen(portName string, mode *Mode) (*unixPort, error) {
h, err := syscall.Open(portName, syscall.O_RDWR|syscall.O_NOCTTY|syscall.O_NDELAY, 0)
if err != nil {