dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
Loading...
Searching...
No Matches
dxd::usb::pipe Class Reference

#include <dxd_usb_platform_pipe.h>

Inheritance diagram for dxd::usb::pipe:
Collaboration diagram for dxd::usb::pipe:

Public Types

enum  type { control = ::UsbdPipeTypeControl , isoc = ::UsbdPipeTypeIsochronous , bulk = ::UsbdPipeTypeBulk , interrupt = ::UsbdPipeTypeInterrupt }

Public Member Functions

os_result abort()
 WDK pipe abort.
os_result clear()
 WDK pipe stall reset, toggle.
direction direction() const
os_result max_frame_size(unsigned int frame_size)
os_result open(const ::USBD_INTERFACE_INFORMATION* usbd_interface)
 binds the pipe to the endpoint's pipe of the given interface setting: a re-selected alternate setting renews the handles
 operator ::USBD_PIPE_HANDLE() const
int outstanding()
 pipe(const ::DEVICE_OBJECT* wdm_target, const decltype(dx::usb::descriptor::endpoint)* endpoint)
 WDK pipe constructor: the endpoint as its descriptor states it, without a handle - open() binds the one of the interface setting the bus carries.
bool poll(dx::usb::isoc::result& result)
 collects the next completed isoc request in submission order, its frame descriptors updated; the context is free again
os_result receive(::MDL* mdl)
 WDK: USB asynchronous irq/bulk receive request.
os_result receive(::MDL* mdl, uint64_t& sequence, isoc_frame* frame, unsigned int frames)
os_result transmit(const ::MDL* mdl)
 WDK: USB asynchronous irq/bulk transmit request.
os_result transmit(const ::MDL* mdl, uint64_t& sequence, isoc_frame* frame, unsigned int frames)
type type() const
os_result write(const ::MDL* mdl) const
 WDK: USB synchronous isochronous write request.
template<typename data_t>
os_result write(const data_t& data) const
os_result write(const void* data, size_t size) const
virtual ~pipe()

Public Attributes

unsigned char address
unsigned short frame_size{}
unsigned char interval{1}
os_result status{not_initialized}
 WDK pipe status.

Member Enumeration Documentation

◆ type

bills "compiler" still does exercises - until it learnt a bit more c++ enums need to go here to be available during rest of class definition.

Enumerator
control 
isoc 
bulk 
interrupt 

Constructor & Destructor Documentation

◆ pipe()

dxd::usb::pipe::pipe(const ::DEVICE_OBJECT* wdm_target, const decltype(dx::usb::descriptor::endpoint)* endpoint)
inline

WDK pipe constructor: the endpoint as its descriptor states it, without a handle - open() binds the one of the interface setting the bus carries.

Here is the call graph for this function:

◆ ~pipe()

virtual dxd::usb::pipe::~pipe()
inlinevirtual

Reimplemented in dxd::usb::stream::pipe< device_t >.

Here is the call graph for this function:

Member Function Documentation

◆ abort()

os_result dxd::usb::pipe::abort()
inline

WDK pipe abort.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear()

os_result dxd::usb::pipe::clear()
inline

WDK pipe stall reset, toggle.

◆ direction()

direction dxd::usb::pipe::direction() const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ max_frame_size()

os_result dxd::usb::pipe::max_frame_size(unsigned int frame_size)
inline
Todo
implement WDK USB max_frame_size() bandwidth adjustment

◆ open()

os_result dxd::usb::pipe::open(const ::USBD_INTERFACE_INFORMATION* usbd_interface)
inline

binds the pipe to the endpoint's pipe of the given interface setting: a re-selected alternate setting renews the handles

◆ operator ::USBD_PIPE_HANDLE()

dxd::usb::pipe::operator ::USBD_PIPE_HANDLE() const
inline

◆ outstanding()

int dxd::usb::pipe::outstanding()
inline

◆ poll()

bool dxd::usb::pipe::poll(dx::usb::isoc::result& result)
inline

collects the next completed isoc request in submission order, its frame descriptors updated; the context is free again

Here is the call graph for this function:

◆ receive() [1/2]

os_result dxd::usb::pipe::receive(::MDL* mdl)
inline

WDK: USB asynchronous irq/bulk receive request.

Here is the call graph for this function:

◆ receive() [2/2]

os_result dxd::usb::pipe::receive(::MDL* mdl, uint64_t& sequence, isoc_frame* frame, unsigned int frames)
inline
Parameters
mdlmemory descriptor of the data to be read
Here is the call graph for this function:

◆ transmit() [1/2]

os_result dxd::usb::pipe::transmit(const ::MDL* mdl)
inline

WDK: USB asynchronous irq/bulk transmit request.

Here is the call graph for this function:

◆ transmit() [2/2]

os_result dxd::usb::pipe::transmit(const ::MDL* mdl, uint64_t& sequence, isoc_frame* frame, unsigned int frames)
inline
Parameters
mdlmemory descriptor of the data to be written
Here is the call graph for this function:

◆ type()

type dxd::usb::pipe::type() const
inline

◆ write() [1/3]

os_result dxd::usb::pipe::write(const ::MDL* mdl) const
inline

WDK: USB synchronous isochronous write request.

Todo
return number of written bytes

WDK: USB synchronous irq/bulk write request

Todo
return number of written bytes

◆ write() [2/3]

template<typename data_t>
os_result dxd::usb::pipe::write(const data_t& data) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write() [3/3]

os_result dxd::usb::pipe::write(const void* data, size_t size) const
inline

Member Data Documentation

◆ address

unsigned char dxd::usb::pipe::address

◆ frame_size

unsigned short dxd::usb::pipe::frame_size{}

◆ interval

unsigned char dxd::usb::pipe::interval{1}

◆ status

os_result dxd::usb::pipe::status{not_initialized}

WDK pipe status.


The documentation for this class was generated from the following file: