如何鏈接CH375文件系統(tǒng)庫-CH375HFx.LIB!!(圖片)

謝謝大俠,問題解決了


我在編譯msp430f149讀U盤出現(xiàn)下面提示是什么原因我用的是IAR4.11 Building configuration: demo - Debug Updating build tree... Linking Warning[w6]: Type conflict for external/entry "mCmdParam", in module CH375MAI against external/entry in module CH375HFT; class/struct/union field names do not match: Other16 vs Query /* In module CH375MAI: */ CMD_PARAM_I mCmdParam; typedef CMD_PARAM CMD_PARAM_I; typedef union _CMD_PARAM CMD_PARAM; /* In module CH375HFT: */ CMD_PARAM_I mCmdParam; typedef CMD_PARAM CMD_PARAM_I; typedef union _CMD_PARAM CMD_PARAM; Warning[w35]: There is more than one definition for the struct/union type with tag '_CMD_PARAM'; class/struct/union field names do not match: Query vs Other16 union _CMD_PARAM /* Elements: 19, Bytes: 30 */ { struct /* Elements: 1, Bytes: 30 */ { UINT8 mBuffer[30]; } Other; struct /* Elements: 4, Bytes: 14 */ { UINT32 mReserved; UINT32 mTotalSector; UINT32 mFreeSector; UINT8 mDiskFat; } Query; struct /* Elements: 1, Bytes: 30 */ { UINT8 mPathName[30]; } Open; struct Enumer; struct /* Elements: 1, Bytes: 1 */ { UINT8 mUpdateLen; } Close; struct Create; struct Erase; struct /* Elements: 4, Bytes: 10 */ { UINT32 mFileSize; UINT16 mFileDate; UINT16 mFileTime; UINT8 mFileAttr; } Modify; struct /* Elements: 1, Bytes: 4 */ { UINT32 mSectorOffset; } Locate; struct /* Elements: 1, Bytes: 1 */ { UINT8 mSectorCount; } Read; struct Write; struct /* Elements: 3, Bytes: 10 */ { UINT8 mSectorCount; UINT8 mReserved[7]; PUINT8 mDataBuffer; } ReadX; struct WriteX; struct /* Elements: 1, Bytes: 4 */ { UINT32 mDiskSizeSec; } DiskSize; struct /* Elements: 1, Bytes: 4 */ { UINT32 mByteOffset; } ByteLocate; struct /* Elements: 2, Bytes: 30 */ { UINT8 mByteCount; UINT8 mByteBuffer[29]; } ByteRead; struct ByteWrite; struct /* Elements: 3, Bytes: 6 */ { UINT8 mSaveVariable; UINT8 mReserved[3]; PUINT8 mBuffer; } SaveVariable; union /* Elements: 2, Bytes: 22 */ { struct /* Elements: 10, Bytes: 22 */ { UINT32 mCBW_Sig; UINT32 mCBW_Tag; UINT8 mCBW_DataLen; UINT8 mCBW_DataLen1; UINT8 mCBW_DataLen2; UINT8 mCBW_DataLen3; UINT8 mCBW_Flag; UINT8 mCBW_LUN; UINT8 mCBW_CB_Len; UINT8 mCBW_CB_Buf[6]; } mCBW; struct /* Elements: 5, Bytes: 14 */ { UINT32 mCSW_Sig; UINT32 mCSW_Tag; UINT32 mCSW_Residue; UINT8 mCSW_Status; UINT8 mReserved; } mCSW; } BOC; }; typedef unsigned char UINT8; typedef unsigned long UINT32; typedef unsigned short UINT16; typedef unsigned char * PUINT8; union _CMD_PARAM /* Elements: 19, Bytes: 30 */ { struct /* Elements: 1, Bytes: 30 */ { UINT8 mBuffer[30]; } Other; struct /* Elements: 1, Bytes: 30 */ { UINT16 mBuffer16[15]; } Other16; struct /* Elements: 1, Bytes: 28 */ { UINT32 mBuffer32[7]; } Other32; struct /* Elements: 4, Bytes: 14 */ { UINT32 mReserved; UINT32 mTotalSector; UINT32 mFreeSector; UINT8 mDiskFat; } Query; struct /* Elements: 1, Bytes: 30 */ { UINT8 mPathName[30]; } Open; struct Enumer; struct /* Elements: 1, Bytes: 1 */ { UINT8 mUpdateLen; } Close; struct Create; struct Erase; struct /* Elements: 6, Bytes: 16 */ { UINT32 mFileSize; UINT16 mFileDate; UINT16 mFileTime; UINT8 mFileAttr; UINT8 mReserved[3]; UINT32 mOldSize; } Modify; struct /* Elements: 1, Bytes: 4 */ { UINT32 mSectorOffset; } Locate; struct /* Elements: 6, Bytes: 10 */ { UINT8 mSectorCount; UINT8 mActualCount; UINT8 mLbaCount; UINT8 mRemainCount; UINT32 mLbaStart; PUINT8X mDataBuffer; } Read; struct /* Elements: 7, Bytes: 14 */ { UINT8 mSectorCount; UINT8 mActualCount; UINT8 mLbaCount; UINT8 mAllocCount; UINT32 mLbaStart; PUINT8X mDataBuffer; UINT32 mSaveValue; } Write; struct /* Elements: 1, Bytes: 4 */ { UINT32 mDiskSizeSec; } DiskSize; struct /* Elements: 1, Bytes: 4 */ { UINT32 mByteOffset; } ByteLocate; struct /* Elements: 2, Bytes: 30 */ { UINT8 mByteCount; UINT8 mByteBuffer[29]; } ByteRead; struct ByteWrite; struct /* Elements: 3, Bytes: 6 */ { UINT8 mSaveVariable; UINT8 mReserved[3]; PUINT8X mBuffer; } SaveVariable; union /* Elements: 2, Bytes: 22 */ { struct /* Elements: 9, Bytes: 22 */ { UINT32 mCBW_Sig; UINT32 mCBW_Tag; UINT8 mCBW_DataLen; UINT8 mCBW_DataLen1; UINT16 mCBW_DataLen2; UINT8 mCBW_Flag; UINT8 mCBW_LUN; UINT8 mCBW_CB_Len; UINT8 mCBW_CB_Buf[6]; } mCBW; struct /* Elements: 5, Bytes: 14 */ { UINT32 mCSW_Sig; UINT32 mCSW_Tag; UINT32 mCSW_Residue; UINT8 mCSW_Status; UINT8 mReserved; } mCSW; } BOC; }; typedef unsigned char UINT8; typedef unsigned short UINT16; typedef unsigned long UINT32; typedef unsigned char * PUINT8X; Total number of errors: 0 Total number of warnings: 2


這2個警告可以不關(guān)心,不影響使用


謝謝樓主,確實不影響使用,我從網(wǎng)站上下載的ch375讀CP2102程序,里面有"HAL.H""HAL_BASE.C"在那能找到


CH374EVT.ZIP,到在線下載里面去搜索就可以了.


請問大俠ch374的 * 寄存器及緩沖區(qū) */

#define RAM_ENDP0_SIZE 0x08 /* 端點0的緩沖區(qū)長度 */ #define RAM_ENDP0_TRAN 0x20 /* 端點0發(fā)送緩沖區(qū)的起始地址 */ #define RAM_ENDP0_RECV 0x28 /* 端點0接收緩沖區(qū)的起始地址 */ #define RAM_ENDP1_SIZE 0x08 /* 端點1的緩沖區(qū)長度 */ #define RAM_ENDP1_TRAN 0x30 /* 端點1發(fā)送緩沖區(qū)的起始地址 */ #define RAM_ENDP1_RECV 0x38 /* 端點1接收緩沖區(qū)的起始地址 */ #define RAM_ENDP2_SIZE 0x40 /* 端點2的緩沖區(qū)長度 */ #define RAM_ENDP2_TRAN 0x40 /* 端點2發(fā)送緩沖區(qū)的起始地址 */ #define RAM_ENDP2_RECV 0xC0 /* 端點2接收緩沖區(qū)的起始地址 */ #define RAM_ENDP2_EXCH 0x80 /* 端點2備用緩沖區(qū)的起始地址 */ #define RAM_HOST_TRAN 0x40 /* 主機發(fā)送緩沖區(qū)的起始地址 */ #define RAM_HOST_RECV 0xC0 /* 主機接收緩沖區(qū)的起始地址 */ #define RAM_HOST_EXCH 0x80 /* 主機備用緩沖區(qū)的起始地址 */

#define REG_HUB_SETUP 0x02 /* 僅USB主機方式: ROOT-HUB配置 */ #define REG_HUB_CTRL 0x03 /* 僅USB主機方式: ROOT-HUB控制 */ #define REG_SYS_INFO 0x04 /* 系統(tǒng)信息, 只讀 */ #define REG_SYS_CTRL 0x05 /* 系統(tǒng)控制, 不受軟件復(fù)位影響 */ #define REG_USB_SETUP 0x06 /* USB配置 */ #define REG_INTER_EN 0x07 /* 中斷使能 */ #define REG_USB_ADDR 0x08 /* USB設(shè)備地址 */ #define REG_INTER_FLAG 0x09 /* 中斷標(biāo)志, 只讀, 位寫1清0 */ #define REG_USB_STATUS 0x0A /* USB狀態(tài), 只讀 */ #define REG_USB_LENGTH 0x0B /* USB長度, 讀為當(dāng)前USB接收長度, 設(shè)備方式下寫為USB端點2, 主機方式下寫為USB主機發(fā)送長度 */ #define REG_USB_ENDP0 0x0C /* 僅USB設(shè)備方式: USB端點0控制 */ #define REG_USB_ENDP1 0x0D /* 僅USB設(shè)備方式: USB端點1控制 */ #define REG_USB_H_PID 0x0D /* 僅USB主機方式: USB主機令牌 */ #define REG_USB_ENDP2 0x0E /* 僅USB設(shè)備方式: USB端點2控制 */ #define REG_USB_H_CTRL 0x0E /* 僅USB主機方式: USB主機控制 */ 這些定義對于ch375能用嗎


對CH375不適用,CH374/5兩者的內(nèi)部結(jié)構(gòu)是完全不同的,CH374是通過訪問寄存器的方式,而375是命令驅(qū)動方式。


謝謝樓主,請問有沒有ch375做主機控制cp2012通訊的相關(guān)例程,可供參考


http://wch.cn/bbs/View.asp?S=101&I=19463 這個鏈接上有CH374操作CP2102的例程,可以參考一下


樓主你好,請您給看一下這段程序里面 UINT8 CP2102_Start_stop( UINT16 Value )//Value=0X0000-->Stop,Value=0x0001-->Start { Buffer[0]=0x41;Buffer[1]=0x00;Buffer[2]=(UINT8)(Value&0xff);Buffer[3]=(UINT8)((Value>>8)&0xff); Buffer[4]=0x00;Buffer[5]=0x00;Buffer[6]=0x00;Buffer[7]=0x00; return ( HostCtrlTransfer375( Buffer, NULL, NULL ) ); } 的 41 00 01 00 00 00 00 00 是什么意思,有沒有關(guān)于端點命令的資料可以參考一下,謝謝


這個你沒有必要詳細(xì)追問,你直接移植就可以了. 41 00 01 00 00 00 00 00 沒有什么意思,就是CP2102自己定義的一個命令,關(guān)于這些操作你不必關(guān)心,這些是經(jīng)過我們數(shù)據(jù)分析看出來的.這個資料估計是不公開的,我們也沒有.


請問:我在ICC6.31A下可以編譯,而在ICC7.14C下不能編譯,如何解決


編譯器版本不兼容,要更換不同的庫,我們有ICCAVR_7.13@AVR 的庫,你可以試試.


這個庫在哪里能找到 ICCAVR_7.13@AVR


網(wǎng)上下載CH375LIB.ZIP或CH374LIB.ZIP,AVR/LIBB_V7


只有登錄才能回復(fù),可以選擇微信賬號登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频