diff options
| author | hathach <[email protected]> | 2019-09-11 11:55:16 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-09-11 11:55:16 +0700 |
| commit | 3f02c359832ec19400265a5ee335e30fde10d24d (patch) | |
| tree | 1209598daadf944eddd6adffc7dcdde27e533ed1 /examples/device/cdc_msc_hid/src | |
| parent | 34b76898da16ea33897d6cb5b908611d81ab5855 (diff) | |
fix #130
Diffstat (limited to 'examples/device/cdc_msc_hid/src')
| -rw-r--r-- | examples/device/cdc_msc_hid/src/msc_disk.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/examples/device/cdc_msc_hid/src/msc_disk.c b/examples/device/cdc_msc_hid/src/msc_disk.c index bc61f5d67..5aa7befc9 100644 --- a/examples/device/cdc_msc_hid/src/msc_disk.c +++ b/examples/device/cdc_msc_hid/src/msc_disk.c @@ -29,11 +29,8 @@ #if CFG_TUD_MSC // Some MCU doesn't have enough 8KB SRAM to store the whole disk -// We will use Flash as read-only disk -// - LPC1347, LPC11uxx -#if (CFG_TUSB_MCU == OPT_MCU_LPC13XX) || (CFG_TUSB_MCU == OPT_MCU_LPC11UXX) -#define DISK_READONLY -#endif +// We will use Flash as read-only disk with board that has +// CFG_EXAMPLE_MSC_READONLY defined #define README_CONTENTS \ "This is tinyusb's MassStorage Class demo.\r\n\r\n\ @@ -46,7 +43,7 @@ enum DISK_BLOCK_SIZE = 512 }; -#ifdef DISK_READONLY +#ifdef CFG_EXAMPLE_MSC_READONLY const #endif uint8_t msc_disk[DISK_BLOCK_NUM][DISK_BLOCK_SIZE] = @@ -193,7 +190,7 @@ int32_t tud_msc_write10_cb(uint8_t lun, uint32_t lba, uint32_t offset, uint8_t* { (void) lun; -#ifndef DISK_READONLY +#ifndef CFG_EXAMPLE_MSC_READONLY uint8_t* addr = msc_disk[lba] + offset; memcpy(addr, buffer, bufsize); #else |
