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
599 stars 188 forks source link

rtl8720dn: device wrapper refactoring #453

Closed deadprogram closed 1 year ago

deadprogram commented 2 years ago

This PR is to start a conversation about refactoring the rtl8720dn driver to be a little more like the other wifi drivers.

It also moves the Wioterminal specific hardware setup into a separate function that is part of the driver code instead of the example.

@sago35 see what you think about this approach. It is very similar to what you have already done, mostly just moves things around a bit to hopefully make it a little easier to use.

sago35 commented 2 years ago

@deadprogram I think all that is left is to format it using go1.19 and the new goimports.

https://pkg.go.dev/golang.org/x/tools/cmd/goimports

deadprogram commented 2 years ago

Corrected.

sago35 commented 2 years ago

LGTM

deadprogram commented 2 years ago

@sago35 commits squashed and ready for final review, please.

deadprogram commented 2 years ago

OK all changes made. I think finally ready to merge!

deadprogram commented 1 year ago

OK, merging. Thanks for all your help @sago35