Add enum argument to SPI status method

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1667 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2009-03-29 18:53:20 +00:00
parent 04f44cd858
commit f7f7c531e0
4 changed files with 37 additions and 25 deletions
+3 -3
View File
@@ -576,7 +576,7 @@ static void mmcsd_checkwrprotect(FAR struct mmcsd_slot_s *slot, ubyte *csd)
* reports temporary write protect.
*/
if ((SPI_STATUS(spi) & SPI_STATUS_WRPROTECTED) != 0 ||
if ((SPI_STATUS(spi, SPIDEV_MMCSD) & SPI_STATUS_WRPROTECTED) != 0 ||
MMCSD_CSD_PERMWRITEPROTECT(csd) ||
MMCSD_CSD_TMPWRITEPROTECT(csd))
{
@@ -1116,7 +1116,7 @@ static int mmcsd_mediainitialize(FAR struct mmcsd_slot_s *slot)
* interface
*/
if ((SPI_STATUS(spi) & SPI_STATUS_PRESENT) == 0)
if ((SPI_STATUS(spi, SPIDEV_MMCSD) & SPI_STATUS_PRESENT) == 0)
{
fdbg("No card present\n");
slot->state |= MMCSD_SLOTSTATUS_NODISK;
@@ -1296,7 +1296,7 @@ static void mmcsd_mediachanged(void *arg)
/* Check if media was removed or inserted */
slot->state &= ~(MMCSD_SLOTSTATUS_NODISK|MMCSD_SLOTSTATUS_NOTREADY|MMCSD_SLOTSTATUS_MEDIACHGD);
if ((SPI_STATUS(spi) & SPI_STATUS_PRESENT) == 0)
if ((SPI_STATUS(spi, SPIDEV_MMCSD) & SPI_STATUS_PRESENT) == 0)
{
/* Media is not present */