Skip to main content

UsbDriver

Struct UsbDriver 

Source
#[repr(C)]
pub struct UsbDriver {
Show 17 fields pub name: *const c_char, pub endpoints: c_int, pub endp: *mut UsbEndpoint, pub intp: *mut UsbInterface, pub devp_hi: *mut c_void, pub confp_hi: *mut c_void, pub devp: *mut c_void, pub confp: *mut c_void, pub str: *mut StringDescriptor, pub recvctl: Option<unsafe extern "C" fn(arg1: c_int, arg2: c_int, req: *mut DeviceRequest) -> c_int>, pub func28: Option<unsafe extern "C" fn(arg1: c_int, arg2: c_int, arg3: c_int) -> c_int>, pub attach: Option<unsafe extern "C" fn(speed: c_int, arg2: *mut c_void, arg3: *mut c_void) -> c_int>, pub detach: Option<unsafe extern "C" fn(arg1: c_int, arg2: c_int, arg3: c_int) -> c_int>, pub unk34: c_int, pub start_func: Option<unsafe extern "C" fn(size: c_int, args: *mut c_void) -> c_int>, pub stop_func: Option<unsafe extern "C" fn(size: c_int, args: *mut c_void) -> c_int>, pub link: *mut UsbDriver,
}
Expand description

USB driver structure used by ::sceUsbbdRegister and ::sceUsbbdUnregister

Fields§

§name: *const c_char

Name of the USB driver

§endpoints: c_int

Number of endpoints in this driver (including default control)

§endp: *mut UsbEndpoint

List of endpoint structures (used when calling other functions)

§intp: *mut UsbInterface

Interface list

§devp_hi: *mut c_void

Pointer to hi-speed device descriptor

§confp_hi: *mut c_void

Pointer to hi-speed device configuration

§devp: *mut c_void

Pointer to full-speed device descriptor

§confp: *mut c_void

Pointer to full-speed device configuration

§str: *mut StringDescriptor

Default String descriptor

§recvctl: Option<unsafe extern "C" fn(arg1: c_int, arg2: c_int, req: *mut DeviceRequest) -> c_int>

Received a control request arg0 is endpoint, arg1 is possibly data arg2 is data buffer

§func28: Option<unsafe extern "C" fn(arg1: c_int, arg2: c_int, arg3: c_int) -> c_int>

Unknown

§attach: Option<unsafe extern "C" fn(speed: c_int, arg2: *mut c_void, arg3: *mut c_void) -> c_int>

Configuration set (attach) function

§detach: Option<unsafe extern "C" fn(arg1: c_int, arg2: c_int, arg3: c_int) -> c_int>

Configuration unset (detach) function

§unk34: c_int

Unknown set to 0

§start_func: Option<unsafe extern "C" fn(size: c_int, args: *mut c_void) -> c_int>

Function called when the driver is started

§stop_func: Option<unsafe extern "C" fn(size: c_int, args: *mut c_void) -> c_int>

Function called when the driver is stopped

§link: *mut UsbDriver

Link to next USB driver in the chain, set to NULL

Trait Implementations§

Source§

impl Clone for UsbDriver

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for UsbDriver

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for UsbDriver

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.