I use Legato 16.10.4 on my mangOH Green board with an WP8548 target.
I successfully managed to install spidev and spisvc (I’ve built my own kernel module spisvc.ko based on the yocto-install).
The spiService application is running and I can call le_spi_Open() and le_spi_Configure() from withing the routine COMPONENT_INIT.
But, how I can handle the different SPI read and write calls?
The Legato docs indicate that a COMPONENT_INIT should always return, so, I can’t use a while(1).
I’ve used the le_fdMonitor API to handle my different UART read and write calls, using the file descriptor that I received from my le_tty_Open() call, and that worked fine.
But, I think I can’t use le_fdMonitor for my SPI handling because SPI works with an le_spi_DeviceHandle instead of a file descriptor.
Any suggestion to handle my different SPI read and write calls?