diff options
author | Leo C | 2014-12-23 10:48:33 +0100 |
---|---|---|
committer | Leo C | 2014-12-23 10:48:33 +0100 |
commit | 11b53d3fc2bf5346bfd2d87191e20b22c5651013 (patch) | |
tree | 415745ba95a6c2374e647ca4697f9d4ff21209a4 | |
parent | a036b05f04dd8e3f32c46971b137cf8a8c2aa210 (diff) | |
download | z180-stamp-11b53d3fc2bf5346bfd2d87191e20b22c5651013.zip |
Don't expose mmc status flag 'STAT_FAST'. (Module private implemantation detail)hexrel-4.2
-rw-r--r-- | avr/mmc.c | 6 | ||||
-rw-r--r-- | include/diskio.h | 1 |
2 files changed, 4 insertions, 3 deletions
@@ -450,7 +450,7 @@ DSTATUS disk_initialize ( if (drv >= MAX_DRV) return STA_NOINIT; /* Supports only single drive */ if (socket[drv].stat & STA_NODISK) - return socket[drv].stat; /* No card in the socket */ + return socket[drv].stat & STAT_MASK; /* No card in the socket */ power_on(drv); /* Force socket power on */ socket[drv].stat &= ~STA_FAST; @@ -505,7 +505,7 @@ DSTATUS disk_initialize ( power_off(drv); } - return socket[drv].stat; + return socket[drv].stat & STAT_MASK; } /*-----------------------------------------------------------------------*/ @@ -518,7 +518,7 @@ DSTATUS disk_status ( { if (drv >= MAX_DRV) return STA_NOINIT; - return socket[drv].stat; + return socket[drv].stat & STAT_MASK; } /*-----------------------------------------------------------------------*/ diff --git a/include/diskio.h b/include/diskio.h index f7a764c..fee87a5 100644 --- a/include/diskio.h +++ b/include/diskio.h @@ -46,6 +46,7 @@ void disk_timerproc (void); #define STA_NODISK 0x02 /* No medium in the drive */ #define STA_PROTECT 0x04 /* Write protected */ #define STA_FAST 0x08 /* Fast SPI clock */ +#define STAT_MASK (STA_NOINIT | STA_NODISK | STA_PROTECT) /* Command code for disk_ioctrl() */ |