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
608 stars 192 forks source link

wifinina: connect improvements #561

Closed deadprogram closed 1 year ago

deadprogram commented 1 year ago

This PR adds a few improvements for connecting the WiFiNINA.

It corrects the timing used for the RESET pins when calling Configure() to match other libraries.

It also adds a new ResetIsHigh property to allow changing the behavior of the RESET pin for boards like the Arduino MKR 1010, which correct #386

Lastly, it makes some changes to the various examples to make a few retry attempts when connecting to the WiFi access point, which appears to solve most of the issues when connecting especially right after flashing.

Note that this PR depends on #560 which needs to be merged first, and then this PR rebased.

deadprogram commented 1 year ago

Now that I have been testing #537 I am going to close this PR. The ResetIsHigh can be added in a separate PR once #537 makes it in.

deadprogram commented 1 year ago

Reopening since #537 will not merge until TinyGo 0.29

deadprogram commented 1 year ago

Rebased against dev with #560 included. Please review! :smile_cat:

scottfeldman commented 1 year ago

I've picked up the ResetIsHigh changes from this PR and copied them to #537.

All the other timing changes have already been picked up in #537.

deadprogram commented 1 year ago

Merging to keep the progress/bug fixes moving along. Thanks everyone!