mirror of
https://github.com/clockworkpi/WiringPi.git
synced 2026-06-16 07:37:16 +02:00
Updated a technicality in softPwm, and added a suggested memset to zero
for the SPI code - it's mentioned in spidev.h but not used in the actual kernel documentation example spi_test.c program )-:
This commit is contained in:
@@ -75,6 +75,11 @@ int wiringPiSPIDataRW (int channel, unsigned char *data, int len)
|
||||
|
||||
channel &= 1 ;
|
||||
|
||||
// Mentioned in spidev.h but not used in the original kernel documentation
|
||||
// test program )-:
|
||||
|
||||
memset (&spi, 0, sizeof (spi)) ;
|
||||
|
||||
spi.tx_buf = (unsigned long)data ;
|
||||
spi.rx_buf = (unsigned long)data ;
|
||||
spi.len = len ;
|
||||
|
||||
Reference in New Issue
Block a user