cancel
Showing results for 
Search instead for 
Did you mean: 

USB report descriptor for newbies

po
Associate II
Posted on September 15, 2011 at 15:34

Hi all,

I am beginner to STM32 and USB. I want to tailor the USB demo (four leds, 2 buttons and potentiometer) to my stm32 sk (board from IAR). I don't understand how to change the report descriptor to my case 6 les, 4 buttons...

I have a found a tool in usb.org which helps to do this staff but I don't understand how to use it. Is there a tutorial that could help me.

Po

Panda
2 REPLIES 2
tsuneo
Senior
Posted on September 19, 2011 at 20:29

The original post was too long to process during our migration. Please click on the provided URL to read the original post. https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I6Xw&d=%2Fa%2F0X0000000bqN%2FvHEXlVH9IqGkIAVwokHY9_l4rx_cl2UkGjcEICfKVO4&asPdf=false
drzile86
Associate II
Posted on September 23, 2011 at 16:36

Hi,

I have attached usb_desc.c and usb_desc.h files, where I haveadapted example from ST for USB HID device.

I configure 4 output reports (from PC e.g. to control LEDs) with IDs 0x01, 0x02, 0x03 and 0x04, and4 input reports (to PC e.g. state of button or potentiometer) with IDs 0x05, 0x06, 0x07 and 0x All reports are 64 bytes and minimum and maximum values are from 0 to I have usedEP1_IN (0x81) andEP1_OUT (0x01). It's very important to set right size of the descriptors. If this is important to you I can write code and set descriptors for your application, but you should give me specs.

Regards

________________

Attachments :

usb_desc.c : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0Z4&d=%2Fa%2F0X0000000baw%2FYdMfsQlgazuUTmzFu95_qQfh6E1Y04O5guWdmmytqT4&asPdf=false

usb_desc.h : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I0bE&d=%2Fa%2F0X0000000bay%2FCll7Ng1jUrZnJHg8U2Xix0G7XtRILW9YSjEBn2RbnDE&asPdf=false