Trait Endpoint

Source
pub trait Endpoint {
    // Required methods
    fn address(&self) -> u8;
    fn endpoint_num(&self) -> u8;
    fn transfer_type(&self) -> TransferType;
    fn direction(&self) -> Direction;
    fn max_packet_size(&self) -> u16;
    fn in_toggle(&self) -> bool;
    fn set_in_toggle(&mut self, toggle: bool);
    fn out_toggle(&self) -> bool;
    fn set_out_toggle(&mut self, toggle: bool);
}
Expand description

Endpoint defines the USB endpoint for various transfers.

Required Methods§

Source

fn address(&self) -> u8

Address of the device owning this endpoint. Must be between 0 and 127.

Source

fn endpoint_num(&self) -> u8

Endpoint number, irrespective of direction. (e.g., for both endpoint addresses, 0x81 and 0x01, this function would return 0x01).

Source

fn transfer_type(&self) -> TransferType

The type of transfer this endpoint uses.

Source

fn direction(&self) -> Direction

The direction of transfer this endpoint accepts.

Source

fn max_packet_size(&self) -> u16

The maximum packet size for this endpoint.

Source

fn in_toggle(&self) -> bool

The data toggle sequence bit for the next transfer from the device to the host.

Source

fn set_in_toggle(&mut self, toggle: bool)

The USBHost will, when required, update the data toggle sequence bit for the next device to host transfer.

Source

fn out_toggle(&self) -> bool

The data toggle sequence bit for the next transfer from the host to the device.

Source

fn set_out_toggle(&mut self, toggle: bool)

The USBHost will, when required, update the data toggle sequence bit for the next host to device transfer.

Implementors§