mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-22 14:08:36 +00:00
Fixed the problem of memory trampling caused by not initializing the structure
Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
This commit is contained in:
parent
f638a21f89
commit
4e3f77d884
1 changed files with 3 additions and 0 deletions
|
|
@ -169,6 +169,9 @@ int spicmd_exch(FAR struct spitool_s *spitool, int argc, FAR char **argv)
|
|||
trans.nwords = spitool->count;
|
||||
trans.txbuffer = txdata;
|
||||
trans.rxbuffer = rxdata;
|
||||
#ifdef CONFIG_SPI_HWFEATURES
|
||||
trans.hwfeat = 0;
|
||||
#endif
|
||||
|
||||
ret = spidev_transfer(fd, &seq);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue