Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serial config enum constant #49

Open
edieruby opened this issue Dec 12, 2024 · 0 comments
Open

serial config enum constant #49

edieruby opened this issue Dec 12, 2024 · 0 comments

Comments

@edieruby
Copy link
Contributor

current in serial.go:
const (
// NoParity disable parity control (default).
NoParity Parity = iota
// OddParity enable odd-parity check.
OddParity
// EvenParity enable even-parity check.
EvenParity
// MarkParity enable mark-parity (always 1) check.
MarkParity
// SpaceParity enable space-parity (always 0) check.
SpaceParity

// OneStopBit sets 1 stop bit (default).
OneStopBit StopBits = iota
// OnePointFiveStopBits sets 1.5 stop bits.
OnePointFiveStopBits
// TwoStopBits sets 2 stop bits.
TwoStopBits

)

OneStopBit is 5

I think it should change two const, like

const (
// NoParity disable parity control (default).
NoParity Parity = iota
// OddParity enable odd-parity check.
OddParity
// EvenParity enable even-parity check.
EvenParity
// MarkParity enable mark-parity (always 1) check.
MarkParity
// SpaceParity enable space-parity (always 0) check.
SpaceParity
)

const (
// OneStopBit sets 1 stop bit (default).
OneStopBit StopBits = iota
// OnePointFiveStopBits sets 1.5 stop bits.
OnePointFiveStopBits
// TwoStopBits sets 2 stop bits.
TwoStopBits
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant