\CH375LIB\MCS51\FILELIB4\EXAM4 中的例子使用KEIL 編譯出現(xiàn)如下錯(cuò)誤! 附部分改動(dòng)程序!//C51 CH375HFT.C //LX51 CH375HFT.OBJ , CH375HF4.LIB /* 如果將CH375HF4換成CH375HF6就可以支持FAT32 */ //OHX51 CH375HFT
#include #include
/* 以下定義的詳細(xì)說(shuō)明請(qǐng)看CH375HF6.H文件 */ #define LIB_CFG_DISK_IO 2 /* 磁盤(pán)讀寫(xiě)的數(shù)據(jù)的復(fù)制方式,1為"單DPTR復(fù)制",2為"雙DPTR復(fù)制",3為"單DPTR和P2+R0復(fù)制" */ #define LIB_CFG_FILE_IO 2 /* 文件讀寫(xiě)的數(shù)據(jù)的復(fù)制方式,0為"外部子程序",1為"單DPTR復(fù)制",2為"雙DPTR復(fù)制",3為"單DPTR和P2+R0復(fù)制" */ #define LIB_CFG_INT_EN 0 /* CH375的INT#引腳連接方式,0為"查詢方式",1為"中斷方式" */ //#define LIB_CFG_FILE_IO_DEFAULT 1*/ /* 使用CH375HF6.H提供的默認(rèn)"外部子程序" */
#define CH375_CMD_PORT_ADDR 0x7FFF /* CH375命令端口的I/O地址 */ #define CH375_DAT_PORT_ADDR 0x6FFF /* CH375數(shù)據(jù)端口的I/O地址 */ /* 只使用單片機(jī)內(nèi)置的1KB外部RAM: 0000H-01FFH 為磁盤(pán)讀寫(xiě)緩沖區(qū), 同時(shí)用于文件數(shù)據(jù)緩沖區(qū) */ #define DISK_BASE_BUF_ADDR 0x0000 /* 外部RAM的磁盤(pán)數(shù)據(jù)緩沖區(qū)的起始地址,從該單元開(kāi)始的緩沖區(qū)長(zhǎng)度為SECTOR_SIZE */ #define FILE_DATA_BUF_ADDR 0x0000 /* 外部RAM的文件數(shù)據(jù)緩沖區(qū)的起始地址,緩沖區(qū)長(zhǎng)度不小于一次讀寫(xiě)的數(shù)據(jù)長(zhǎng)度 */ /* 由于單片機(jī)內(nèi)置的外部RAM只有1KB, 有些單片機(jī)還要去掉256字節(jié)內(nèi)部RAM, 只剩下768字節(jié)的外部RAM, 其中前512字節(jié)由CH375子程序用于磁盤(pán)數(shù)據(jù)緩沖, 在調(diào)用CH375DirtyBuffer子程序后同時(shí)也用于文件讀寫(xiě)緩沖 */ #define FILE_DATA_BUF_LEN 0x0200 /* 外部RAM的文件數(shù)據(jù)緩沖區(qū),緩沖區(qū)長(zhǎng)度不小于一次讀寫(xiě)的數(shù)據(jù)長(zhǎng)度 */ sbit P1_3 = P1^3; #define CH375_INT_WIRE P1_3 /* P3.2, INT0, CH375的中斷線INT#引腳,連接CH375的INT#引腳,用于查詢中斷狀態(tài) */
#include "CH375HF6.H" /* 如果不需要支持FAT32,那么請(qǐng)選用CH375HF4.H */
*** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILEREADX MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILECREATE MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375DISKCONNECT MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILELOCATE MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILEWRITEX MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375DIRTYBUFFER MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILEMODIFY MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375LIBCONFIG MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILECLOSE MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375DISKREADY MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375VSECTORSIZE MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375INIT MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375DISKSTATUS MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375FILEOPEN MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375VFILESIZE MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: PDISK_BASE_BUF MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375INTSTATUS MODULE: CH375HFT.obj (CH375HFT) *** WARNING L1: UNRESOLVED EXTERNAL SYMBOL SYMBOL: CH375GETVER MODULE: CH375HFT.obj (CH375HFT) *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375FILEREADX MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0A3EH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375FILEWRITEX MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0A49H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375FILEOPEN MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0A4DH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375FILEMODIFY MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0A27H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INTSTATUS MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0961H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INTSTATUS MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0964H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INTSTATUS MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0969H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INTSTATUS MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 096FH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INTSTATUS MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0971H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375DISKSTATUS MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0976H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INTSTATUS MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 097AH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375DISKSTATUS MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 097FH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375LIBCONFIG MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 09B4H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375GETVER MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 09B7H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: PDISK_BASE_BUF MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 09C3H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: PDISK_BASE_BUF MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 09C6H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375INIT MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 09C9H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375DISKSTATUS MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0033H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375DISKREADY MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0055H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VSECTORSIZE MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0065H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VSECTORSIZE MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 006BH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375DISKCONNECT MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 007CH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375FILEOPEN MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 009BH *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375FILEOPEN MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 00E5H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VSECTORSIZE MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0131H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VFILESIZE MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0142H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VFILESIZE MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0144H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VFILESIZE MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0146H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VFILESIZE MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0148H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SYMBOL: CH375VSECTORSIZE MODULE: CH375HFT.obj (CH375HFT) ADDRESS: 0153H *** WARNING L2: REFERENCE MADE TO UNRESOLVED EXTERNAL SY