Type Alias flipperzero_sys::usbd_cfg_callback

source ·
pub type usbd_cfg_callback = Option<unsafe extern "C" fn(dev: *mut usbd_device, cfg: u8) -> usbd_respond>;
Expand description

USB set configuration callback function

called when SET_CONFIGURATION request issued

§Arguments

  • dev (direction in) - pointer to USB device
  • cfg (direction in) - configuration number.

Note: if config is 0 device endpoints should be de-configured

§Returns

TRUE if success

Aliased Type§

enum usbd_cfg_callback {
    None,
    Some(unsafe extern "C" fn(_: *mut _usbd_device, _: u8) -> u8),
}

Variants§

§1.0.0

None

No value.

§1.0.0

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

Some value of type T.