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

nRF52840 USB HID, how to set up and send a feature report?

Hello,

I want to use  USB HID and set up  a feature report to send some configuration data. Is there any example to guide how  to do it?

Tks

Parents Reply
  • I want to use a Windows API ( HID_GetFeature ) to get a feature report on my device. It returns 0.

    How can I fill the report feature buffer in nRF code? Which API to fill value for the feature buffer?

    /**
     * @brief USB HID instance.
     */
    typedef struct {
        app_usbd_hid_subclass_desc_t const ** const p_subclass_desc; //!< HID subclass descriptors array.
        size_t subclass_desc_count;                                  //!< HID subclass descriptors count.
    
        app_usbd_hid_subclass_t subclass_boot;    //!< Boot device (see HID definition).
        app_usbd_hid_protocol_t protocol;         //!< HID protocol (see HID definition).
    
        app_usbd_hid_report_buffer_t       * p_rep_buffer_in;        //!< Report buffer IN.
        app_usbd_hid_report_buffer_t const * p_rep_buffer_out;       //!< Report buffer OUT (only one instance).
        app_usbd_hid_report_buffer_t const * p_rep_buffer_feature;   //!< Report buffer FEATURE.
        app_usbd_hid_methods_t const       * p_hid_methods;          //!< Hid interface methods.
        app_usbd_hid_user_ev_handler_t       user_event_handler;     //!< User event handler.
    
        uint8_t * p_ep_interval;   //!< Endpoint intervals.
    } app_usbd_hid_inst_t;
    

Children
Related