Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into andre-rs485
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreRenaud committed Jul 4, 2024
2 parents bdfda6f + 0996f84 commit 9f3f1f3
Show file tree
Hide file tree
Showing 13 changed files with 123 additions and 398 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,22 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v1
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.17"
- name: Build native
go-version: "1.22"
- name: Setup CGO Environment
run: |
if [ ${{ matrix.os }} == 'macOS-latest' ] ; then
echo "CGO_ENABLED=1" >> "$GITHUB_ENV"
fi
shell: bash
- name: Build AMD64
run: GOARCH=amd64 go build -v ./...
shell: bash
- name: Build ARM64
run: GOARCH=arm64 go build -v ./...
shell: bash
- name: Install socat
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install socat
Expand Down Expand Up @@ -51,10 +60,10 @@ jobs:
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v1
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.17"
go-version: "1.22"
- name: Cross-build
run: |
set ${{ matrix.go-os-pairs }}
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@

# go.bug.st/serial

A cross-platform serial library for go-lang.
A cross-platform serial port library for Go.

## Documentation and examples

See the godoc here: https://godoc.org/go.bug.st/serial
See the package documentation here: https://pkg.go.dev/go.bug.st/serial

## go.mod transition

This library now support `go.mod` with the import `go.bug.st/serial`.
This library supports `go.mod` with the import `go.bug.st/serial`.

If you came from the pre-`go.mod` era please update your import paths from `go.bug.st/serial.v1` to `go.bug.st/serial` to receive new updates. Anyway, the latest `v1` release should still be avaiable using the old import.
If you came from the pre-`go.mod` era please update your import paths from `go.bug.st/serial.v1` to `go.bug.st/serial` to receive updates. The latest `v1` release is still available using the old import path.

## Credits

:sparkles: Thanks to all awesome [contributors]! :sparkles:

## License

The software is release under a [BSD 3-clause license]
This software is released under the [BSD 3-clause license].

[contributors]: https://github.com/bugst/go-serial/graphs/contributors
[BSD 3-clause license]: https://github.com/bugst/go-serial/blob/master/LICENSE
Expand Down
2 changes: 1 addition & 1 deletion enumerator/usb_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const (
spdrpUpperFilters = 0x00000011 // UpperFilters = R/W
spdrpLowerFilters = 0x00000012 // LowerFilters = R/W
spdrpBusTypeGUID = 0x00000013 // BusTypeGUID = R
spdrpLegactBusType = 0x00000014 // LegacyBusType = R
spdrpLegacyBusType = 0x00000014 // LegacyBusType = R
spdrpBusNumber = 0x00000015 // BusNumber = R
spdrpEnumeratorName = 0x00000016 // Enumerator Name = R
spdrpSecurity = 0x00000017 // Security = R/W, binary form
Expand Down
2 changes: 1 addition & 1 deletion example_modem_bits_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"go.bug.st/serial"
)

func ExampleGetSetModemBits() {
func ExamplePort_GetModemStatusBits() {
// Open the first serial port detected at 9600bps N81
mode := &serial.Mode{
BaudRate: 9600,
Expand Down
2 changes: 1 addition & 1 deletion example_serialport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"go.bug.st/serial"
)

func ExampleSerialPort_SetMode() {
func ExamplePort_SetMode() {
port, err := serial.Open("/dev/ttyACM0", &serial.Mode{})
if err != nil {
log.Fatal(err)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.17
require (
github.com/creack/goselect v0.1.2
github.com/stretchr/testify v1.8.4
golang.org/x/sys v0.17.0
golang.org/x/sys v0.19.0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
Expand Down
2 changes: 1 addition & 1 deletion portlist/portlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// Port: /dev/cu.usbmodemFD121
// USB ID 2341:8053
// USB serial FB7B6060504B5952302E314AFF08191A
//

package main

import (
Expand Down
2 changes: 1 addition & 1 deletion serial.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ const (
PortNotFound
// InvalidSerialPort the requested port is not a serial port
InvalidSerialPort
// PermissionDenied the user doesn't have enough priviledges
// PermissionDenied the user doesn't have enough privileges
PermissionDenied
// InvalidSpeed the requested speed is not valid or not supported
InvalidSpeed
Expand Down
Loading

0 comments on commit 9f3f1f3

Please sign in to comment.