USBD ROM API with custom class

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

USBD ROM API with custom class

1,272件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JAlvarez on Wed Jul 17 17:08:00 MST 2013
The documentation for the USB ROM APIs does not go in much detail on the implementation of custom classes. There in an FAQ How to implement custom class device? but it is empty. Other parts of the documentation make brief mention of the general steps without much detail. The usb_csc.c example does override the data endpoint handlers with USBD_API->core->RegisterEpHandler() but doesn't override the control ep0 endpoint handler with USBD_API->core->RegisterClassHandler(). Is there a working example of a custom class with the USBD ROM API that overrides the ep0 handler?

Thanks.
ラベル(1)
0 件の賞賛
返信
3 返答(返信)

1,075件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kikaxa on Thu Aug 08 06:53:13 MST 2013
I got working bulk communications by using init code from usb class examples, custom descriptors and by registering endpoint in/out handlers, same way as rom_cdc support code from lpcusblib does in usbd_cdc.c

<50 LOC total, pretty simple.

still need to figure out how to detect usb cable reconnect.
0 件の賞賛
返信

1,075件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JAlvarez on Mon Jul 29 05:58:04 MST 2013
NXP Tech Support sent me an example of a custom class using the ROM API. It was quite useful. I am reposting it here in case it is of use to others.

Note that the example writes directly to the DMA structures (pDTD). With the current USB ROM API, those writes could be substituted by ReadEP() in the OUT handler, WriteEP() in the IN handler and ReadReqEP() in the OUT NAK handler.
0 件の賞賛
返信

1,075件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by fcarlo on Thu Jul 25 03:11:28 MST 2013
It's a shame that NXP provides such great features like USB ROM API without putting a little effort on documentation.
0 件の賞賛
返信