mirror of
https://github.com/tinygo-org/drivers.git
synced 2026-08-03 06:27:47 +00:00
wifinina: correct sendParamStr to handle empty strings, such as when connecting to an unsecured access point.
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
@@ -969,7 +969,9 @@ func (d *Device) sendParamBuf(p []byte, isLastParam bool) (l int) {
|
||||
func (d *Device) sendParamStr(p string, isLastParam bool) (l int) {
|
||||
l = len(p)
|
||||
d.SPI.Transfer(uint8(l))
|
||||
d.SPI.Tx([]byte(p), nil)
|
||||
if l > 0 {
|
||||
d.SPI.Tx([]byte(p), nil)
|
||||
}
|
||||
if isLastParam {
|
||||
d.SPI.Transfer(CmdEnd)
|
||||
l += 1
|
||||
|
||||
Reference in New Issue
Block a user