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
@ -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…
Reference in New Issue
Block a user