Permalink
Browse files

Merge pull request #4 from efargas/patch-1

Issue with ioctl
  • Loading branch information...
derekmolloy committed Oct 12, 2016
2 parents 5d00b6a + 8d06227 commit 4ff7ecaecad6efdd77a0468236d01d75ed5aa588
Showing with 1 addition and 0 deletions.
  1. +1 −0 library/bus/SPIDevice.cpp
@@ -86,6 +86,7 @@ int SPIDevice::open(){
*/
int SPIDevice::transfer(unsigned char send[], unsigned char receive[], int length){
struct spi_ioc_transfer transfer;
+ memset(&transfer,0,sizeof(transfer));
transfer.tx_buf = (unsigned long) send;
transfer.rx_buf = (unsigned long) receive;
transfer.len = length;

0 comments on commit 4ff7eca

Please sign in to comment.