Announcements
IMPORTANT: Cypress Developer Community is transitioning on October 20th. To learn more and be prepared for this change, check out our latest announcement.
cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

KyTr_1955226
Valued Contributor

Hello Everyone,

I have a PSoC5LP based USB Composite Device (HID Keyboard and Mouse) that I'm working on.  One of the problems I've run into is that I require the keyboard to be functional in BIOS of the host PC.  From what I can gather, I need to create a second Keyboard HID descriptor that conforms to the Boot Interface.  Creating a new HID descriptor is no problem, but I'm not sure where in my overall Device Descriptor this new HID device should go?  Is it it's own entirely new device that requires its own endpoints?  Can I just create a new "Alternate Setting" under the keyboard interface to be used on boot?

My descriptor tree is below:

pastedImage_0.png

Here's what I think adding the boot keyboard should maybe look like:

pastedImage_1.png

Is this the right track?  Do the Boot Keyboard settings and Custom HID Keyboard settings need to use different endpoints or can they both use EP1 and the host will switch between them?  Do I need to handle this switch from the Boot Keyboard to the Custom Keyboard in firmware?  or will the USBFS component handle it for me with no intervention needed from my code?

If this were a normal keyboard, It looks like I could simply change the keyboard subclass to "Boot Interface Subclass" and call it a day, but in the OS the keyboard must support additional keycodes beyond the standard 101/104.  From my understanding extended keycodes are incompatible with the Boot Interface, so simply changing the Custom HID Keyboard to a Boot Device would probably cut those extended codes out, so that option is out.

If anyone out there has some knowledge of USB could chime in, it would be greatly appreciated.

Thanks!

0 Likes
1 Solution
Ekta
Moderator
Moderator

Hello,

In case of a multi-function device you can create different interface for each of the configuration (function of the device) of the device. A device could have 1 or many interface descriptors active at a time. For example, if a USB device with functions A, B and C exists then you can create three Interface descriptors for each of the functions. Also, there is no limitation as to having only on interface active at a time.

We create different alternate settings for an interface descriptor when an interface can be used in two modes (one at a time). USB interface endpoints may act as interrupt pipes in normal settings, but might act as Bulk pipe in alternate settings providing you the facility of two different mode on the same interface.

Therefore you can either add interface descriptor if the two functions are active at the same time or an alternate setting within the same interface descriptor if you are switching the modes of the device.

An endpoint is not shared among different interfaces within a single configuration, although a single interface can have several alternate settings which may use the same endpoints.

Best Regards

Ekta

View solution in original post

0 Likes
1 Reply
Ekta
Moderator
Moderator

Hello,

In case of a multi-function device you can create different interface for each of the configuration (function of the device) of the device. A device could have 1 or many interface descriptors active at a time. For example, if a USB device with functions A, B and C exists then you can create three Interface descriptors for each of the functions. Also, there is no limitation as to having only on interface active at a time.

We create different alternate settings for an interface descriptor when an interface can be used in two modes (one at a time). USB interface endpoints may act as interrupt pipes in normal settings, but might act as Bulk pipe in alternate settings providing you the facility of two different mode on the same interface.

Therefore you can either add interface descriptor if the two functions are active at the same time or an alternate setting within the same interface descriptor if you are switching the modes of the device.

An endpoint is not shared among different interfaces within a single configuration, although a single interface can have several alternate settings which may use the same endpoints.

Best Regards

Ekta

View solution in original post

0 Likes