tinygo-org / drivers

TinyGo drivers for sensors, displays, wireless adaptors, and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.
https://tinygo.org
BSD 3-Clause "New" or "Revised" License
607 stars 192 forks source link

Netdev changes - rebased #613

Closed deadprogram closed 10 months ago

deadprogram commented 11 months ago

This PR is basically https://github.com/tinygo-org/drivers/pull/537 but fully rebased against the latest dev

deadprogram commented 10 months ago

Passes all smoke tests when run against https://github.com/tinygo-org/tinygo/tree/net-submodule-netdev3

deadprogram commented 10 months ago

When attempting to compile the "examples/socket" program, I get the following error:

# tinygo.org/x/drivers/examples/net/socket
examples/net/socket/main.go:64:33: too many arguments in call to dev.Connect
        have (int, string, net.IP, int)
        want (int, string, netip.AddrPort)
examples/net/socket/main.go:65:50: too many arguments in call to dev.Connect
        have (int, string, net.IP, int)
        want (int, string, netip.AddrPort)

cc @scottfeldman

scottfeldman commented 10 months ago

When attempting to compile the "examples/socket" program, I get the following error:

# tinygo.org/x/drivers/examples/net/socket
examples/net/socket/main.go:64:33: too many arguments in call to dev.Connect
        have (int, string, net.IP, int)
        want (int, string, netip.AddrPort)
examples/net/socket/main.go:65:50: too many arguments in call to dev.Connect
        have (int, string, net.IP, int)
        want (int, string, netip.AddrPort)

Fixed in https://github.com/tinygo-org/drivers/pull/623. Missed some updates to examples when converting to net/netip APIs.

deadprogram commented 10 months ago

Now that PR https://github.com/tinygo-org/tinygo/pull/3704 has been merged, the tests in this branch are passing!

deadprogram commented 10 months ago

I've rebased it down to 14 commits. Now merging. Thank you very much @scottfeldman @soypat and everyone else who helped work on this.