STM32F103 Composite Example

Building a Composite Device with STM32 is quite easy if you understand USB properly .If you have followed my previous tutorial you must have known how  to use the device as a VCP .Now lets Make it a composite device so that we can do multiple things with it.

 

 

screensnap1

screensnap2

This is How our device will show up in Windows.

Before proceeding to codes I would recommend you  to grab some ideas about  IAD class and  how to write HID reports . I will recommend the same book called  “USB Complete” .Also go through this link to have a basic idea about Microsoft’s standards for Digitizers.

If you have done the  VCP example properly then it wouldn’t be tough for you to manage it . We need to modify 6 files   & those are  ” usb_desc.c  , usb_desc.h ,   usb_endp.c  ,usb_prop.c  , usb_prop.h ,usb_conf.h ..

I am posting the files below . A //////////////////////////////////add mark represents the modified regions .

 

USB_desc.c

 

 

USB_desc.h

USB_Prop.c

 

 

USB_prop.h

 

USB_conf.h

 

USB_endp.c

Finally we need to add a little function that can be used to send touch data to PC.

I hope this helps …..

Sometimes pain is useful ….

Share

AboutHarprasad

I do what I love. There is a famous quote "Love the process not the product " & I think this is what differentiates developers from consumers .