Nanaloveyuki/madk/transport does not have a README file

UsbTransport

pub(open) trait UsbTransport {
fn info(Self) -> DeviceInfo raise TransportError
fn control(Self, ControlTransfer, Int) -> Bytes raise TransportError
fn bulk_write(Self, Int, Bytes, Int) -> Int raise TransportError
fn bulk_read(Self, Int, Int, Int) -> Bytes raise TransportError
fn close(Self) -> Unit raise TransportError
}

TransportError

pub(all) suberror TransportError {
InvalidDeviceInfo(String)
InvalidControlRequest(String)
InvalidEndpoint(Int)
InvalidLength(Int)
Timeout
Disconnected
Closed
ShortTransfer(Int, Int)
UnsupportedRequest(Int)
Failure(String)
} derive(Eq,
Debug
)

ControlTransfer

pub struct ControlTransfer {
// private fields
} derive(Eq,
Debug
)

ControlTransfer::data

fn ControlTransfer::data(self : ControlTransfer) -> Bytes

ControlTransfer::in_request

fn ControlTransfer::in_request(request_type~ : Int, request~ : Int, value~ : Int, index~ : Int, length~ : Int) -> ControlTransfer raise TransportError

ControlTransfer::index

fn ControlTransfer::index(self : ControlTransfer) -> Int

ControlTransfer::is_in

fn ControlTransfer::is_in(self : ControlTransfer) -> Bool

ControlTransfer::length

fn ControlTransfer::length(self : ControlTransfer) -> Int

ControlTransfer::out_request

fn ControlTransfer::out_request(request_type~ : Int, request~ : Int, value~ : Int, index~ : Int, data~ : Bytes) -> ControlTransfer raise TransportError

ControlTransfer::request

fn ControlTransfer::request(self : ControlTransfer) -> Int

ControlTransfer::request_type

fn ControlTransfer::request_type(self : ControlTransfer) -> Int

ControlTransfer::value

fn ControlTransfer::value(self : ControlTransfer) -> Int

DeviceInfo

pub struct DeviceInfo {
// private fields
} derive(Eq,
Debug
)

DeviceInfo::bulk_in_endpoint

fn DeviceInfo::bulk_in_endpoint(self : DeviceInfo) -> Int?

DeviceInfo::bulk_out_endpoint

fn DeviceInfo::bulk_out_endpoint(self : DeviceInfo) -> Int?

DeviceInfo::has_bulk_endpoints

fn DeviceInfo::has_bulk_endpoints(self : DeviceInfo) -> Bool

DeviceInfo::new

fn DeviceInfo::new(vendor_id~ : Int, product_id~ : Int, bulk_in_endpoint~ : Int?, bulk_out_endpoint~ : Int?) -> DeviceInfo raise TransportError

DeviceInfo::product_id

fn DeviceInfo::product_id(self : DeviceInfo) -> Int

DeviceInfo::vendor_id

fn DeviceInfo::vendor_id(self : DeviceInfo) -> Int

Source Files

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io