usbd_dsc_callback

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§

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

Variants§

§1.0.0

None

No value.

§1.0.0

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

Some value of type T.