I'm working with MCF52259 in a bsp/psp modified from the tower board provided.
According to MQXIOUG rev 18, section 9.6 "Using the driver", I should be able to open multiple file handles to the same SPI channel, each using different Chip Selects (CS).
The paragraph reads:
"As described above, the SPI driver may be concurrently used from multiple tasks using multiple file
handles without needing any additional locking or synchronization in the application since the bus
reservation mechanism, internal to the SPI driver, prevents collisions in multitasking environment."
However, when I try something like this:
f1 = fopen("spi0:", NULL);
f2 = fopen("spi0:", NULL);
, the second fopen fails. Making f2 equal to NULL.
Am I missing something? How can I really open two file descriptors for the same SPI channel?