flipperzero_sys

Type Alias usbd_evt_callback

Source
pub type usbd_evt_callback = Option<unsafe extern "C" fn(dev: *mut usbd_device, event: u8, ep: u8)>;
Expand description

Generic USB device event callback for events and endpoints processing

§Arguments

  • dev (direction in) - pointer to USB device
  • event - USB_EVENTS “USB event”
  • ep - active endpoint number

Note: endpoints with same indexes i.e. 0x01 and 0x81 shares same callback.

Aliased Type§

enum usbd_evt_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.