flipperzero_sys

Type Alias 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

§Arguments

  • req (direction in) - pointer to usb control request structure
  • address (direction in, out) - pointer to the descriptor in memory. Points to req->data by default. You can use this buffer.
  • dsize (direction in, out) - descriptor size. maximum buffer size by default.

§Returns

usbd_ack if you passed the correct descriptor, usbd_fail otherwise.

Aliased Type§

enum usbd_dsc_callback {
    None,
    Some(unsafe extern "C" fn(_: *mut usbd_ctlreq, _: *mut *mut c_void, _: *mut u16) -> u8),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *mut usbd_ctlreq, _: *mut *mut c_void, _: *mut u16) -> u8)

Some value of type T.