USB descriptor to usb hid and USB mass memory

General discussion on mikroElektronika website & forums.
Post Reply
Author
Message
Prof.Wagner
Posts: 126
Joined: 25 Mar 2011 04:35

USB descriptor to usb hid and USB mass memory

#1 Post by Prof.Wagner » 05 Apr 2016 19:57

Hi Everyone,

I need to develop a device that sometimes runs like USB HID and sometimes USB mass memory. I dont know how to put 2 descriptor in the my device.

I will use PIC32 and language I can use mikrobasic or mikroc.

Somebody can help me how I can change the descriptor in run time inside of program?

When I turn on the device I need that it works like USB mass memory device after few seconds it need to run like usb hid.

I can not imagine like to do this changing of descriptor.

Thanks in advanced

prof. Wagner

User avatar
biljana.nedeljkovic
mikroElektronika team
Posts: 1043
Joined: 30 Jun 2015 15:15

Re: USB descriptor to usb hid and USB mass memory

#2 Post by biljana.nedeljkovic » 06 Apr 2016 11:51

Hello,

Take a look at our USB Device Library, it supports HID and mass storage:
http://libstock.mikroe.com/projects/vie ... ce-library

Have you tried to write something already?

Kind regards,
Biljana

Prof.Wagner
Posts: 126
Joined: 25 Mar 2011 04:35

Re: USB descriptor to usb hid and USB mass memory

#3 Post by Prof.Wagner » 07 Apr 2016 16:11

Hi,

I developed several devices in USB HID and others in USB CDC using mikroBasic and MIkroC with PIC32 Host and device. What I don´t know is when I need to have the both USB HID and USB CDC together. I know that I need to have 2 descriptors, but I don´t know how I change one and another when my device needs to be USB HID or when my device need to be USB CDC.

Could you help me?

Regards

Prof. Wagner

User avatar
biljana.nedeljkovic
mikroElektronika team
Posts: 1043
Joined: 30 Jun 2015 15:15

Re: USB descriptor to usb hid and USB mass memory

#4 Post by biljana.nedeljkovic » 08 Apr 2016 14:23

Hello,

This user made a descriptor for Composite USB CDC and HID, you can maybe find it helpful:
http://forum.mikroe.com/viewtopic.php?f=164&t=56048

Kind regards,
Biljana

Post Reply

Return to “Website & Forums General Discussion”