Merge pull request #1810 from soypat/write_wlan-fix

rp::wlan_write: avoid ineffectual writing of entire buffer over spi
This commit is contained in:
Dario Nieuwenhuis 2023-08-22 21:20:59 +00:00 committed by GitHub
commit b436aad2a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -102,7 +102,7 @@ where
cmd_buf[0] = cmd; cmd_buf[0] = cmd;
cmd_buf[1..][..buf.len()].copy_from_slice(buf); cmd_buf[1..][..buf.len()].copy_from_slice(buf);
self.status = self.spi.cmd_write(&cmd_buf).await; self.status = self.spi.cmd_write(&cmd_buf[..buf.len() + 1]).await;
} }
#[allow(unused)] #[allow(unused)]