wow wow wow
That is interesting because all my tests are with spi ce1 because ce0 is used by my OLED spi. I took a look onto SPI code and may be the IOCTL can only drive the 1st SPI bus chip Enable.
For my code I am using the bcm2835 Library which provide GPIO control and I2C/SPI management.
take a look at
http://www.open.com.au/mikem/bcm2835/ Trust me this Library rocks and provide SPI function that does work fine.
I wrote a librf24-bcm Library (based on your code but changed IO pin control and SPI control to use this library) using this bcm2835.c instead of gpio.cpp and spi.cpp.
I can send you the code if you want to test or integrate it to your github, sample should work same except the declaration that use the bcm2835 pin constant.
So to instantiate following these examples
CE pin is pin 15 of connector so GPIO 22 and CSN is
SPI Hardware driven by pi CE0 pin
Code: Select all
RF24 radio(RPI_V2_GPIO_P1_15, BCM2835_SPI_CS0 );
CE pin is pin 22 of connector so GPIO 25 and CSN is
SPI Hardware driven by pi CE1 pin
Code: Select all
RF24 radio(RPI_V2_GPIO_P1_22, BCM2835_SPI_CS1 );
CE pin is pin 22 of connector so GPIO 25 and CSN is
software driven by pin 25 of connector so GPIO 22
Code: Select all
RF24 radio(RPI_V2_GPIO_P1_22, RPI_V2_GPIO_P1_15);