summaryrefslogtreecommitdiff
path: root/software/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'software/main.go')
-rw-r--r--software/main.go16
1 files changed, 2 insertions, 14 deletions
diff --git a/software/main.go b/software/main.go
index 48b71e7..d0d3a8c 100644
--- a/software/main.go
+++ b/software/main.go
@@ -7,22 +7,10 @@ import (
)
func main() {
- ports, err := communication.GetStSerials()
+ iface, err := communication.NewSerialInterface()
if err != nil {
log.Fatal(err)
}
- if len(ports) != 1 {
- log.Fatalf("Require exactly one serial port from STMicroelectronics but %d attached", len(ports))
- }
-
- log.Printf("Detected serial port: %s\n", ports[0])
-
- phy, err := communication.NewPhy(ports[0])
-
- log.Println("Starting to print out incoming data from serial port")
- err = phy.Cat()
- if err != nil {
- log.Fatal(err)
- }
+ iface.Log()
}