This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于TM4C123G的DISKIO.C的问题



部分代码


#include <stdint.h>
#include <stdbool.h>
#include "inc/hw_types.h"
#include "driverlib/sysctl.h"
#include "usblib/usblib.h"
#include "usblib/usbmsc.h"
#include "usblib/host/usbhost.h"
#include "usblib/host/usbhmsc.h"
#include "diskio.h"
#include "ff.h"

extern tUSBHMSCInstance *psMSCInstance;

static volatile
DSTATUS USBStat = STA_NOINIT; /* Disk status */

/*-----------------------------------------------------------------------*/
/* Initialize Disk Drive */
/*-----------------------------------------------------------------------*/


#define ATA 1
#define MMC 2
#define USB 0
DSTATUS
disk_initialize(
BYTE bValue) /* Physical drive number (0) */
{
/* Set the not initialized flag again. If all goes well and the disk is */
/* present, this will be cleared at the end of the function. */
USBStat |= STA_NOINIT;

/* Find out if drive is ready yet. */
if (USBHMSCDriveReady(psMSCInstance)) return(FR_NOT_READY);

/* Clear the not init flag. */
USBStat &= ~STA_NOINIT;

return 0;
}

提示extern tUSBHMSCInstance *psMSCInstance 未定义。

我想问下psMSCInstance这个变量应该读取什么样的数据。(我用的TM4C的例程usb_dev_msc)

谢谢