Re: USB joystick 範例
|
||||
---|---|---|---|---|
資深會員
|
你好,我按照你所寫修改Product ID及report descriptor,還有修改Configuration 1 Descriptor裡的protocol code為HID_PROTOCOL_NONE,build all之後出現
C:\MCHPFSUSB\fw\Hid\Mouse\autofiles\usbdsc.c:286:Error [1218] extraneous initializer values 請問是哪裡有問題了,請賜教,謝謝
發表於: 2005/12/23 10:08
|
|||
|
Re: USB joystick 範例
|
||||
---|---|---|---|---|
資深會員
|
請問一下,詳細的descriptor說明要去什麼地方找,意思是descriptor裡的INPUT、OUTPUT、USAGE、USAGE PAGE等代表什麼意思
發表於: 2005/12/9 10:21
|
|||
|
Re: USB joystick 範例
|
||||
---|---|---|---|---|
初級會員
|
Joystick 的程式可以改寫MCHPUSB的滑鼠範例程式,記得要更改Product ID,以免辨識錯誤。最複雜的descriptor可於usbdsc.c中修改如下所示。
rom struct{byte report[HID_RPT01_SIZE];}hid_rpt01={ 0x05, 0x01, 0x15, 0x00, 0x09, 0x04, 0xA1, 0x01, 0x05, 0x02, 0x09, 0xBB, 0x15, 0x81, 0x25, 0x7F, 0x75, 0x08, 0x95, 0x01, 0x81, 0x02, 0x05, 0x01, 0x09, 0x01, 0xA1, 0x00, 0x09, 0x30, 0x09, 0x31, 0x95, 0x02, 0x81, 0x02, 0xC0, 0x09, 0x39, 0x15, 0x00, 0x25, 0x03, 0x35, 0x8, 0x46, 0x0E, 0x01, 0x65, 0x14, 0x75, 0x04, 0x95, 0x01, 0x81, 0x02, 0x05, 0x09, 0x19, 0x01, 0x29, 0x04, 0x15, 0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x04, 0x55, 0x00, 0x65, 0x00, 0x81, 0x02, 0xC0}; 這個定義可以使用3個旋轉,一組hat switch以及幾個按鍵。當然還需要去修改其他相關檔案以確保記憶體與變數的大小。這些修改都可以參閱相關資料或picdemusb手冊的說明。 加油。
發表於: 2005/12/5 17:04
|
|||
|
Re: USB joystick 範例
|
||||
---|---|---|---|---|
管理員
|
Hi,
有一位北科大的曾老師已經有用 PIC18F4550 完成 joystick 的範例 . 他也非常熱心的要提供出來 . 我們會在收到後貼至檔案下載區 . 謝謝啦 !
發表於: 2005/12/5 14:11
|
|||
|
USB joystick 範例
|
||||
---|---|---|---|---|
資深會員
|
請問誰有USB的joystick的範例程式,使用PIC18F4550
發表於: 2005/11/29 16:58
|
|||
|