summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-10-01 16:11:34 +0700
committerhathach <[email protected]>2013-10-01 16:11:34 +0700
commit18b3179bc65a4080b71d3928baf5d64b43f2a53e (patch)
tree0b9fd3cd6bc8ab1ebe1dc42f98f144d73ee3ab08 /vendor
parent640b0ec5467eadf153c4a09d53e0a38bae752685 (diff)
refractor msc host app examples
Diffstat (limited to 'vendor')
-rw-r--r--vendor/fatfs/diskio.h3
-rw-r--r--vendor/fatfs/ffconf.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/vendor/fatfs/diskio.h b/vendor/fatfs/diskio.h
index bd3688580..b6aa881fb 100644
--- a/vendor/fatfs/diskio.h
+++ b/vendor/fatfs/diskio.h
@@ -84,7 +84,8 @@ DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff);
static inline bool disk_is_ready(BYTE pdrv);
static inline bool disk_is_ready(BYTE pdrv)
{
- return (disk_status(pdrv) & (STA_NOINIT | STA_NODISK)) == 0;
+ return (pdrv < TUSB_CFG_HOST_DEVICE_MAX) &&
+ ( (disk_status(pdrv) & (STA_NOINIT | STA_NODISK)) == 0 );
}
diff --git a/vendor/fatfs/ffconf.h b/vendor/fatfs/ffconf.h
index 2ba90f251..75c5c15af 100644
--- a/vendor/fatfs/ffconf.h
+++ b/vendor/fatfs/ffconf.h
@@ -9,6 +9,7 @@
#ifndef _FFCONF
#define _FFCONF 82786 /* Revision ID */
+#include "tusb_config.h"
/*---------------------------------------------------------------------------/
/ Functions and Buffer Configurations
@@ -127,7 +128,7 @@
/ Physical Drive Configurations
/----------------------------------------------------------------------------*/
-#define _VOLUMES 1
+#define _VOLUMES TUSB_CFG_HOST_DEVICE_MAX
/* Number of volumes (logical drives) to be used. */