Function libopencm3_sys::usbd_register_control_callback [−][src]
pub unsafe extern "C" fn usbd_register_control_callback(
usbd_dev: *mut usbd_device,
type_: u8,
type_mask: u8,
callback: usbd_control_callback
) -> c_int
Registers a control callback.
Since the list of user control callbacks is cleared every time device configuration is set (inside usb_standard_set_configuration()), control callback registration must happen inside (or after) the config callback. The specified callback will be called if (type == (bmRequestType & type_mask)). @sa usbd_register_set_config_callback @param type Handled request type @param type_mask Mask to apply before matching request type @return 0 if successful