tinygo.org/x/drivers@v0.27.1-0.20240509133757-7dbca2a54349/netlink/probe/rtl8720dn.go (about)

     1  //go:build wioterminal
     2  
     3  package probe
     4  
     5  import (
     6  	"machine"
     7  
     8  	"tinygo.org/x/drivers/netdev"
     9  	"tinygo.org/x/drivers/netlink"
    10  	"tinygo.org/x/drivers/rtl8720dn"
    11  )
    12  
    13  func Probe() (netlink.Netlinker, netdev.Netdever) {
    14  
    15  	cfg := rtl8720dn.Config{
    16  		// Device
    17  		En: machine.RTL8720D_CHIP_PU,
    18  		// UART
    19  		Uart:     machine.UART3,
    20  		Tx:       machine.PB24,
    21  		Rx:       machine.PC24,
    22  		Baudrate: 614400,
    23  	}
    24  
    25  	rtl := rtl8720dn.New(&cfg)
    26  	netdev.UseNetdev(rtl)
    27  
    28  	return rtl, rtl
    29  }