//go:build !android package main import "github.com/albenik/go-serial/v2" // cts returns the clear-to-send status of a device. On Android it will return true as GetModemStatusBits() fails there. func cts(p *serial.Port) (bool, error) { r, err := p.GetModemStatusBits() if err != nil { return false, err } return r.CTS, nil }