co_usb
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
co_usb::basic_transfer< EpType, Direction > Struct Template Reference

Base transfer type which provides Capy's ReadStream/WriteStream operations depending on the direction of the endpoint provided. More...

#include <transfer_types.hpp>

Public Member Functions

 basic_transfer (int iso_packets=0)
 
consteval ep_direction direction () const noexcept
 
constexpr endpoint_type ep_type () const noexcept
 
auto raw () const noexcept
 
boost::capy::io_task< size_tread_some (boost::capy::mutable_buffer buf)
 Partial read from an endpoint.
 
boost::capy::io_task< size_twrite_some (boost::capy::const_buffer buf)
 Partial write to an endpoint.
 

Protected Attributes

unique_transfer m_tfer
 

Detailed Description

template<endpoint_type EpType, ep_direction Direction>
struct co_usb::basic_transfer< EpType, Direction >

Base transfer type which provides Capy's ReadStream/WriteStream operations depending on the direction of the endpoint provided.

Note
Prefer using concrete transfer types which are correctly prefilled on construction

Constructor & Destructor Documentation

◆ basic_transfer()

template<endpoint_type EpType, ep_direction Direction>
co_usb::basic_transfer< EpType, Direction >::basic_transfer ( int  iso_packets = 0)
inlineexplicit

Member Function Documentation

◆ direction()

template<endpoint_type EpType, ep_direction Direction>
consteval ep_direction co_usb::basic_transfer< EpType, Direction >::direction ( ) const
inlinenoexcept

◆ ep_type()

template<endpoint_type EpType, ep_direction Direction>
constexpr endpoint_type co_usb::basic_transfer< EpType, Direction >::ep_type ( ) const
inlineconstexprnoexcept

◆ raw()

template<endpoint_type EpType, ep_direction Direction>
auto co_usb::basic_transfer< EpType, Direction >::raw ( ) const
inlinenoexcept

◆ read_some()

template<endpoint_type EpType, ep_direction Direction>
boost::capy::io_task< size_t > co_usb::basic_transfer< EpType, Direction >::read_some ( boost::capy::mutable_buffer  buf)
inline

Partial read from an endpoint.

Provides a buffer to the transfer and submits it via transfer_awaitable.

Note
Overrides the existing buffer, length, user_data and callback_fn of the internal libusb_transfer.

◆ write_some()

template<endpoint_type EpType, ep_direction Direction>
boost::capy::io_task< size_t > co_usb::basic_transfer< EpType, Direction >::write_some ( boost::capy::const_buffer  buf)
inline

Partial write to an endpoint.

Provides a buffer to the transfer and submits it via transfer_awaitable.

Note
Overrides the existing buffer, length, user_data and callback_fn of the internal libusb_transfer.

Member Data Documentation

◆ m_tfer

template<endpoint_type EpType, ep_direction Direction>
unique_transfer co_usb::basic_transfer< EpType, Direction >::m_tfer
protected

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