Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5a98dbc

Browse files
committedSep 23, 2021
make OpenSerial public
1 parent e541576 commit 5a98dbc

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
 

‎flasher/flasher.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ type Flasher interface {
6666
// https://github.com/arduino-libraries/WiFiNINA/blob/master/examples/Tools/FirmwareUpdater/FirmwareUpdater.ino
6767
const baudRate = 1000000
6868

69-
func openSerial(portAddress string) (serial.Port, error) {
69+
func OpenSerial(portAddress string) (serial.Port, error) {
7070

7171
port, err := serial.Open(portAddress, &serial.Mode{BaudRate: baudRate})
7272
if err != nil {

‎flasher/nina.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import (
3737

3838
// NewNinaFlasher creates an new instance of NinaFlasher
3939
func NewNinaFlasher(portAddress string) (*NinaFlasher, error) {
40-
port, err := openSerial(portAddress)
40+
port, err := OpenSerial(portAddress)
4141
if err != nil {
4242
logrus.Error(err)
4343
return nil, err

‎flasher/winc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636
)
3737

3838
func NewWincFlasher(portAddress string) (*WincFlasher, error) {
39-
port, err := openSerial(portAddress)
39+
port, err := OpenSerial(portAddress)
4040
if err != nil {
4141
logrus.Error(err)
4242
return nil, err

0 commit comments

Comments
 (0)
Please sign in to comment.