mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-15 04:13:40 +00:00
wifi/espat, rtl8720dn, wifinina: move towards standard common interface for wifi adaptors
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package espat
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"tinygo.org/x/drivers"
|
||||
)
|
||||
|
||||
func (d *Device) ConnectToAccessPoint(ssid, pass string, timeout time.Duration) error {
|
||||
if len(ssid) == 0 {
|
||||
return drivers.ErrWiFiMissingSSID
|
||||
}
|
||||
|
||||
return d.ConnectToAP(ssid, pass, 10)
|
||||
}
|
||||
|
||||
func (d *Device) Disconnect() error {
|
||||
return d.DisconnectFromAP()
|
||||
}
|
||||
Reference in New Issue
Block a user