Files
Scott Feldman 8238f96319 move netdev and netlink into their own packages and out of drivers
This moves the netdev/netlink namespace out of drivers and into their
own packages.  Also, defines netdev and netlink as L3/L4 and L2 OSI
layers, respectively.  Move some L3 functionality from netlink to
netdev (GetIPAddr).

For netlink, add ConnectParams for NetConnect to pass in L2 connection
parameters (ssid, pass, auth_type, etc).  Also adds connection mode
(STA, AP, etc).

For netlink, add SendEth and RecvEthFunc funcs to handle L2 send/recv of
Ethernet pkts.
2023-12-06 20:09:39 +01:00

27 lines
407 B
Go

//go:build challenger_rp2040
package probe
import (
"machine"
"tinygo.org/x/drivers/espat"
"tinygo.org/x/drivers/netdev"
"tinygo.org/x/drivers/netlink"
)
func Probe() (netlink.Netlinker, netdev.Netdever) {
cfg := espat.Config{
// UART
Uart: machine.UART1,
Tx: machine.UART1_TX_PIN,
Rx: machine.UART1_RX_PIN,
}
esp := espat.NewDevice(&cfg)
netdev.UseNetdev(esp)
return esp, esp
}