Re: 請問有關"USB列舉過程"
|
||||
---|---|---|---|---|
高級會員
|
謝謝版主.....
我後來翻閱了一些相關的Spec. 沒錯.....它是一次送的.... 所以Sample Code裡沒有單獨傳送Interface Descriptor 的Code..... 真是太感謝版主....
發表於: 2006/7/18 10:20
|
|||
|
請問有關"USB列舉過程"
|
||||
---|---|---|---|---|
高級會員
|
各位高手大家好....
小弟在寫USB韌體時有些疑問.... 希望各位高手能給予指導......... 在列舉的過程中.... 0. Reset Device 1. Host先發出一個SETUP要求Device Descriptor用Address 0 2. Device送出Device Descriptor用Address 0 3. Host發出一個SETUP要求Set_Address 4. Device端接收此Address 5. Reset Device 根據一些USB IC Spec. 說...接下來Host會利用新的Address來重新要求 Device Descriptor....然後是要求Configuration Descriptor...之後再要求其他 如Interface,Class,Endpoint的Descriptor.......... 接下來Host會送出Set Configuration要求來完成此列舉....... 說了一大堆...真是抱歉....^^ 我想問的問題是,當Device得到一個新Address時並且Host也提出要求... 這時送出Device Descriptor後...接下來是Configuration Descriptor.... 請問Host是一直送出SETUP來要求Interface,Class,Endpoint...然後Device這端再根據要求回應這些Descriptor..... 還是 Device在收到Configuration Descriptor要求後...一次將Configuration,Interface,Class,Endpoint這些Descriptor全部傳送...... 因為我看CYPRESS Spec.列舉過程的範例(含packets)...是一次全送的... 而我用的是PIC18F2455....我所得到的Sample Code其中的Get_Descriptor的Function中並沒有對應發送Interface Descriptor的相關內容,而且在Descriptor的資料結構中,,,Interface是和Configuration聯在一起的,EndPoint是和HID連在一起的..... 所以想請各位高手給予解答....... 還有...我用SnoopyPro看我的列舉過程....... 我發現.....我只傳了一次Device Descriptor(正常應該有兩次),,,,,卻傳了兩次Configuration Descriptor.....而且第二次傳送時,資料中除了Configuration Descriptor還包括Interface,HID,Endpoint的Descriptor...... 而且我的列舉是成功的,且USB功能正常....!!!!?? USB實在是太玄了<===應該是太夢幻了...... 謝謝各位高手.........
發表於: 2006/7/13 11:12
|
|||
|