MSS_USBH_register_class_driver

Function MSS_USBH_register_class_driver 

Source
pub unsafe extern "C" fn MSS_USBH_register_class_driver(
    class_handle: *mut c_void,
) -> i8
Expand description

The MSS_USBH_register_class_driver() function must be used by the application to register a USBH-Class driver with the USBH driver. The application must first get the handle from the USBH-Class driver before assigning it to the USBH driver. Refer the USBH-Class section to know how to get a handle from the USBH-Class driver. This handle is used by the USBH driver to communicate with the USBH-Class driver.

@param class_handle The class_handle parameter specifies the class driver handle to be registered with the USBH driver.

@return This function returns zero when execution was successful.

Example: @code mss_usbh_user_cb_t MSS_USBH_user_cb = { USB_DEV_attached, USB_DEV_dettached, USB_DEV_oc_error, USB_DEV_enumerated, USB_DEV_class_driver_assigned, USB_DEV_not_supported, USB_DEV_permanent_erro };

MSS_USBH_init(&MSS_USBH_user_cb); MSS_USBH_register_class_driver(MSS_USBH_HID_get_handle()); @endcode