[En-Nut-Discussion] MMC Driver and multiple SPI Devices

Malte Marwedel m.marwedel at onlinehome.de
Sat Aug 8 16:24:00 CEST 2009

I am trying to figure out how to use two slaves on the SPI device from 
different threads. One is a MMC and the other a mp3 decoder.
So at every access, I had to set the proper chip select and SPI speed.
My Idea is, to insert a MUTEX into the SpiMmCardSelect function, locking 
if the card select is 1 and releasing if the card select is 0 and doing 
the same for the mp3 decoder Select function driver.

I tried to figure out where SpiMmCardSelect function in the given 
mmcard.c is called. There are several calls which Select(1) and Select(0).
It looks like, beside of init and reset functions, there is always a 
Select(1) and a Select(0) later. Or is there anything I have overseen?

Malte Marwedel

More information about the En-Nut-Discussion mailing list