rust-embedded/linux-embedded-hal

How to use SPI with gpio_cdev

patrickelectric opened this issue · 1 comments

Using gpio_cdev the line handler return Error { kind: Ioctl { kind: LineHandle, cause: EBUSY } } when requesting a pin configured as SPI chip select.

In my case, when running a raspberry pi 5:
line 16: "GPIO16" "spi1 CS2" output active-low [used]

ls /dev/spidev*
/dev/spidev0.0  /dev/spidev1.0  /dev/spidev10.0  /dev/spidev1.1  /dev/spidev1.2

Any suggestion or example of how to use chip selects with the new API ?
It appears to run fine in a Raspberry Pi 4.
line 16: "GPIO16" unused output active-high

ls /dev/spidev
spidev0.0  spidev1.0  spidev1.1  spidev1.2

any suggestion @eldruin ?