This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

USB HID consumer control

Hi,

   I want to add HID consumer control to the usbd_hid_composite example in SDK16. I have seen HID consumer control in the ble_app_hids_mouse example but don't know how to implement the same in the usbd_hid_composite example. Can anyone explain how can I achieve this?

Thanks 

  • Hi,

      

       I want to add HID consumer control to the usbd_hid_composite example in SDK16. I have seen HID consumer control in the ble_app_hids_mouse example but don't know how to implement the same in the usbd_hid_composite example. Can anyone explain how can I achieve this?

    In order to change the descriptor, you have to change the class, meaning the files that are located in this directory:

    SDK-dir/components/libraries/usbd/class/hid/mouse/ 

     

    This is a larger job compared to using the usbd_hid_generic example and describing your own descriptor when defining the endpoint:

    #define MY_DESCRIPTOR { \
    
      0x05, 0x01, \
      .... \
    }
    
    APP_USBD_HID_GENERIC_SUBCLASS_REPORT_DESC(mouse_desc,MY_DESCRIPTOR);
     
    You can then call app_usbd_hid_generic_in_report_set() with the corresponding dataf format that your descriptor expects.
     
    Kind regards,
    Håkon
  • Hi,

      Thanks for the response.

       I have tried replacing the hid mouse descriptor with hid consumer control and changing the report buffer size. It stops responding, does not show any error nor any data on the PC.

       Can you tell me what other changes need to be made?

    Thanks

Related