mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
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:
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user