Decoupled net package from espat

This commit is contained in:
BCG
2019-12-15 11:50:21 -05:00
committed by Ron Evans
parent 7b56e61d52
commit cc5ecafacf
13 changed files with 84 additions and 35 deletions
+3
View File
@@ -24,6 +24,8 @@ import (
"strconv"
"strings"
"time"
"tinygo.org/x/drivers/net"
)
// Device wraps UART connection to the ESP8266/ESP32.
@@ -48,6 +50,7 @@ func New(b machine.UART) *Device {
// Configure sets up the device for communication.
func (d Device) Configure() {
ActiveDevice = &d
net.ActiveDevice = ActiveDevice
}
// Connected checks if there is communication with the ESP8266/ESP32.