Hobbyist Toolkit

cancel
Showing results for 
Search instead for 
Did you mean: 

Linx for Raspberry Pi

I have tried to integrate some hardware hat that uses the SPI bus. This device uses the CE0 line and to use that one would have to use the /dev/spidev0.0 device name when opening the device.

The Linx shared library for Raspberry Pi does however only open one SPI device and that is hardwired to /dev/spidev0.1.

 

Why does the shared library not provide both spi devices?

 

- It would seem as easy as updating the definition in the LinxRaspberryPi2B.cpp to add this second channel and also increase the number of SPI channels to 2.

 

Why does the LinxRaspberryPi::SpiWriteRead() insist on using a custom CE pin?

 

- The spidev0.0 and spidev0.1 devices will internally use the according CE0 and CE1 pin already. So it would be useful to only execute the custom CE pin handling if the csChan input is unequal to 0. With 0 as input just skip the custom CE handling.

 

//Set CS As Output And Make Sure CS Starts Idle	
if (csChan)
    DigitalWrite(csChan, (~csLL & 0x01) );

 

Who is best to be contacted about this?

 

Is the github repository regularly monitored?

Rolf Kalbermatter
My Blog
0 Kudos
Message 1 of 1
(2,388 Views)