Type Definition flipperzero_sys::usbd_dsc_callback

source ·
pub type usbd_dsc_callback = Option<unsafe extern "C" fn(req: *mut usbd_ctlreq, address: *mut *mut c_void, dsize: *mut u16) -> usbd_respond>;
Expand description

USB get descriptor callback function

Called when GET_DESCRIPTOR request issued

Returns:

  • usbd_ack if you passed the correct descriptor, usbd_fail otherwise.

Arguments

  • req - [Direction: In] pointer to usb control request structure
  • address - [Direction: Out] pointer to the descriptor in memory. Points to req->data by default. You can use this buffer.
  • dsize - [Direction: Out] descriptor size. maximum buffer size by default.