Skip to content

Commit

Permalink
Issue with ioctl
Browse files Browse the repository at this point in the history
 "Error – Problem transmitting spi data..ioctl: Invalid argument

Due to changes in the underlying library the spi_ioc_transfer struct now needs to be initialised to NULL
  • Loading branch information
efargas committed Apr 30, 2016
1 parent 5c62461 commit 8d06227
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/bus/SPIDevice.cpp
Expand Up @@ -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;
Expand Down

1 comment on commit 8d06227

@kurt
Copy link

@kurt kurt commented on 8d06227 Aug 15, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a possibility that ioctl.h is just not on your BBB? Looking through my directory I found that I did not have ioctl.h in /usr/include/sys

Please sign in to comment.