µOS++ IIIe Reference  v6.3.15
“Perfekt ist nicht gut genug”
The third edition of µOS++, a POSIX inspired open source system, written in C++.
os::driver::usbh_wrapper Class Reference

#include <usbh-wrapper.h>

Inherits os::driver::usb::Host.

Public Member Functions

 usbh_wrapper (ARM_DRIVER_USBH *driver, ARM_USBH_SignalPortEvent_t c_cb_port_func, ARM_USBH_SignalPipeEvent_t c_cb_pipe_func) noexcept
 
 usbh_wrapper (const usbh_wrapper &)=delete
 
 usbh_wrapper (usbh_wrapper &&)=delete
 
virtual ~usbh_wrapper () noexcept
 
return_t abort_transfer (pipe_t pipe) noexcept
 
pipe_t create_pipe (device_address_t dev_addr, speed_t dev_speed, hub_addr_t hub_addr, hub_port_t hub_port, endpoint_t ep_addr, endpoint_type_t ep_type, packet_size_t ep_max_packet_size, polling_interval_t ep_interval) noexcept
 
return_t delete_pipe (pipe_t pipe) noexcept
 
const host::Capabilities & get_capabilities (void) noexcept
 
uint16_t get_frame_number (void) noexcept
 
host::Status & get_port_status (port_t port) noexcept
 
std::size_t get_transfer_count (pipe_t pipe) noexcept
 
const Versionget_version (void) noexcept
 Get driver version. More...
 
return_t modify_pipe (pipe_t pipe, device_address_t dev_addr, speed_t dev_speed, hub_addr_t hub_addr, hub_port_t hub_port, packet_size_t ep_max_packet_size) noexcept
 
usbh_wrapperoperator= (const usbh_wrapper &)=delete
 
usbh_wrapperoperator= (usbh_wrapper &&)=delete
 
return_t power (Power state) noexcept
 Power up/down device. More...
 
return_t power_port_vbus (port_t port, bool vbus) noexcept
 
void register_pipe_callback (host::signal_pipe_event_t cb_func, const void *cb_object=nullptr) noexcept
 
void register_port_callback (host::signal_port_event_t cb_func, const void *cb_object=nullptr) noexcept
 Register port event callback. More...
 
return_t reset_pipe (pipe_t pipe) noexcept
 
return_t reset_port (port_t port) noexcept
 
return_t resume_port (port_t port) noexcept
 
void signal_pipe_event (pipe_t pipe, event_t event) noexcept
 
void signal_port_event (port_t port, event_t event) noexcept
 
return_t suspend_port (port_t port) noexcept
 
return_t transfer (pipe_t pipe, uint32_t packet, uint8_t *data, std::size_t num) noexcept
 

Protected Member Functions

virtual return_t do_abort_transfer (usb::pipe_t pipe) noexcept override
 
virtual usb::pipe_t do_create_pipe (usb::device_address_t dev_addr, usb::speed_t dev_speed, usb::hub_addr_t hub_addr, usb::hub_port_t hub_port, usb::endpoint_t ep_addr, usb::endpoint_type_t ep_type, usb::packet_size_t ep_max_packet_size, usb::polling_interval_t ep_interval) noexcept override
 
virtual return_t do_delete_pipe (usb::pipe_t pipe) noexcept override
 
virtual const usb::host::Capabilitiesdo_get_capabilities (void) noexcept override
 
virtual uint16_t do_get_frame_number (void) noexcept override
 
virtual usb::host::Statusdo_get_port_status (usb::port_t port) noexcept override
 
virtual std::size_t do_get_transfer_count (usb::pipe_t pipe) noexcept override
 
virtual const Versiondo_get_version (void) noexcept override
 
virtual return_t do_modify_pipe (usb::pipe_t pipe, usb::device_address_t dev_addr, usb::speed_t dev_speed, usb::hub_addr_t hub_addr, usb::hub_port_t hub_port, usb::packet_size_t ep_max_packet_size) noexcept override
 
virtual return_t do_power (Power state) noexcept override
 
virtual return_t do_power_port_vbus (usb::port_t port, bool vbus) noexcept override
 
virtual return_t do_reset_pipe (usb::pipe_t pipe) noexcept override
 
virtual return_t do_reset_port (usb::port_t port) noexcept override
 
virtual return_t do_resume_port (usb::port_t port) noexcept override
 
virtual return_t do_suspend_port (usb::port_t port) noexcept override
 
virtual return_t do_transfer (usb::pipe_t pipe, uint32_t packet, uint8_t *data, std::size_t num) noexcept override
 

Private Attributes

ARM_USBH_SignalPipeEvent_t c_cb_pipe_func_
 
ARM_USBH_SignalPortEvent_t c_cb_port_func_
 
usb::host::Capabilities capa_
 
ARM_DRIVER_USBHdriver_
 Pointer to CMSIS USBD Keil driver. More...
 
usb::host::Status status_
 
Version version_ { 0, 0 }
 

Detailed Description

Definition at line 61 of file usbh-wrapper.h.

Constructor & Destructor Documentation

◆ usbh_wrapper() [1/3]

os::driver::usbh_wrapper::usbh_wrapper ( ARM_DRIVER_USBH driver,
ARM_USBH_SignalPortEvent_t  c_cb_port_func,
ARM_USBH_SignalPipeEvent_t  c_cb_pipe_func 
)
noexcept

Definition at line 44 of file usbh-wrapper.cpp.

◆ usbh_wrapper() [2/3]

os::driver::usbh_wrapper::usbh_wrapper ( const usbh_wrapper )
delete

◆ usbh_wrapper() [3/3]

os::driver::usbh_wrapper::usbh_wrapper ( usbh_wrapper &&  )
delete

◆ ~usbh_wrapper()

os::driver::usbh_wrapper::~usbh_wrapper ( )
virtualnoexcept

Definition at line 54 of file usbh-wrapper.cpp.

Member Function Documentation

◆ abort_transfer()

return_t os::driver::usb::Host::abort_transfer ( pipe_t  pipe)
inlinenoexceptinherited

Definition at line 481 of file usb-host.h.

◆ create_pipe()

pipe_t os::driver::usb::Host::create_pipe ( device_address_t  dev_addr,
speed_t  dev_speed,
hub_addr_t  hub_addr,
hub_port_t  hub_port,
endpoint_t  ep_addr,
endpoint_type_t  ep_type,
packet_size_t  ep_max_packet_size,
polling_interval_t  ep_interval 
)
inlinenoexceptinherited

Definition at line 443 of file usb-host.h.

◆ delete_pipe()

return_t os::driver::usb::Host::delete_pipe ( pipe_t  pipe)
inlinenoexceptinherited

Definition at line 463 of file usb-host.h.

◆ do_abort_transfer()

return_t os::driver::usbh_wrapper::do_abort_transfer ( usb::pipe_t  pipe)
overrideprotectedvirtualnoexcept

Implements os::driver::usb::Host.

Definition at line 200 of file usbh-wrapper.cpp.

◆ do_create_pipe()

usb::pipe_t os::driver::usbh_wrapper::do_create_pipe ( usb::device_address_t  dev_addr,
usb::speed_t  dev_speed,
usb::hub_addr_t  hub_addr,
usb::hub_port_t  hub_port,
usb::endpoint_t  ep_addr,
usb::endpoint_type_t  ep_type,
usb::packet_size_t  ep_max_packet_size,
usb::polling_interval_t  ep_interval 
)
overrideprotectedvirtualnoexcept

Implements os::driver::usb::Host.

Definition at line 147 of file usbh-wrapper.cpp.

◆ do_delete_pipe()

return_t os::driver::usbh_wrapper::do_delete_pipe ( usb::pipe_t  pipe)
overrideprotectedvirtualnoexcept

Implements os::driver::usb::Host.

Definition at line 174 of file usbh-wrapper.cpp.

◆ do_get_capabilities()

const usb::host::Capabilities & os::driver::usbh_wrapper::do_get_capabilities ( void  )
overrideprotectedvirtualnoexcept

Implements os::driver::usb::Host.

Definition at line 77 of file usbh-wrapper.cpp.

◆ do_get_frame_number()

usb::frame_number_t os::driver::usbh_wrapper::do_get_frame_number ( void  )
overrideprotectedvirtualnoexcept

Implements os::driver::usb::Host.

Definition at line 206 of file usbh-wrapper.cpp.

◆ do_get_port_status()

usb::host::Status & os::driver::usbh_wrapper::do_get_port_status ( usb::port_t  port)
overrideprotectedvirtualnoexcept

Implements os::driver::usb::Host.

Definition at line 86 of file usbh-wrapper.cpp.

◆ do_get_transfer_count()

std::size_t os::driver::usbh_wrapper::do_get_transfer_count ( usb::pipe_t  pipe)
overrideprotectedvirtualnoexcept

Implements os::driver::usb::Host.

Definition at line 194 of file usbh-wrapper.cpp.

◆ do_get_version()

const Version & os::driver::usbh_wrapper::do_get_version ( void  )
overrideprotectedvirtualnoexcept

Implements os::driver::Base.

Definition at line 68 of file usbh-wrapper.cpp.

◆ do_modify_pipe()

return_t os::driver::usbh_wrapper::do_modify_pipe ( usb::pipe_t  pipe,
usb::device_address_t  dev_addr,
usb::speed_t  dev_speed,
usb::hub_addr_t  hub_addr,
usb::hub_port_t  hub_port,
usb::packet_size_t  ep_max_packet_size 
)
overrideprotectedvirtualnoexcept

Implements os::driver::usb::Host.

Definition at line 162 of file usbh-wrapper.cpp.

◆ do_power()

return_t os::driver::usbh_wrapper::do_power ( Power  state)
overrideprotectedvirtualnoexcept

Implements os::driver::Base.

Definition at line 97 of file usbh-wrapper.cpp.

◆ do_power_port_vbus()

return_t os::driver::usbh_wrapper::do_power_port_vbus ( usb::port_t  port,
bool  vbus 
)
overrideprotectedvirtualnoexcept

Implements os::driver::usb::Host.

Definition at line 123 of file usbh-wrapper.cpp.

◆ do_reset_pipe()

return_t os::driver::usbh_wrapper::do_reset_pipe ( usb::pipe_t  pipe)
overrideprotectedvirtualnoexcept

Implements os::driver::usb::Host.

Definition at line 180 of file usbh-wrapper.cpp.

◆ do_reset_port()

return_t os::driver::usbh_wrapper::do_reset_port ( usb::port_t  port)
overrideprotectedvirtualnoexcept

Implements os::driver::usb::Host.

Definition at line 129 of file usbh-wrapper.cpp.

◆ do_resume_port()

return_t os::driver::usbh_wrapper::do_resume_port ( usb::port_t  port)
overrideprotectedvirtualnoexcept

Implements os::driver::usb::Host.

Definition at line 141 of file usbh-wrapper.cpp.

◆ do_suspend_port()

return_t os::driver::usbh_wrapper::do_suspend_port ( usb::port_t  port)
overrideprotectedvirtualnoexcept

Implements os::driver::usb::Host.

Definition at line 135 of file usbh-wrapper.cpp.

◆ do_transfer()

return_t os::driver::usbh_wrapper::do_transfer ( usb::pipe_t  pipe,
uint32_t  packet,
uint8_t *  data,
std::size_t  num 
)
overrideprotectedvirtualnoexcept

Implements os::driver::usb::Host.

Definition at line 186 of file usbh-wrapper.cpp.

◆ get_capabilities()

const host::Capabilities & os::driver::usb::Host::get_capabilities ( void  )
inlinenoexceptinherited

Definition at line 407 of file usb-host.h.

◆ get_frame_number()

uint16_t os::driver::usb::Host::get_frame_number ( void  )
inlinenoexceptinherited

Definition at line 487 of file usb-host.h.

◆ get_port_status()

host::Status & os::driver::usb::Host::get_port_status ( port_t  port)
inlinenoexceptinherited

Definition at line 437 of file usb-host.h.

◆ get_transfer_count()

std::size_t os::driver::usb::Host::get_transfer_count ( pipe_t  pipe)
inlinenoexceptinherited

Definition at line 475 of file usb-host.h.

◆ get_version()

const Version & os::driver::Base::get_version ( void  )
inlinenoexceptinherited

Get driver version.

Returns
Version.

Definition at line 201 of file common.h.

◆ modify_pipe()

return_t os::driver::usb::Host::modify_pipe ( pipe_t  pipe,
device_address_t  dev_addr,
speed_t  dev_speed,
hub_addr_t  hub_addr,
hub_port_t  hub_port,
packet_size_t  ep_max_packet_size 
)
inlinenoexceptinherited

Definition at line 454 of file usb-host.h.

◆ operator=() [1/2]

usbh_wrapper& os::driver::usbh_wrapper::operator= ( const usbh_wrapper )
delete

◆ operator=() [2/2]

usbh_wrapper& os::driver::usbh_wrapper::operator= ( usbh_wrapper &&  )
delete

◆ power()

return_t os::driver::Base::power ( Power  state)
inlinenoexceptinherited

Power up/down device.

Parameters
[in]statePower state
Returns
Execution status

Definition at line 207 of file common.h.

◆ power_port_vbus()

return_t os::driver::usb::Host::power_port_vbus ( port_t  port,
bool  vbus 
)
inlinenoexceptinherited

Definition at line 413 of file usb-host.h.

◆ register_pipe_callback()

void os::driver::usb::Host::register_pipe_callback ( host::signal_pipe_event_t  cb_func,
const void *  cb_object = nullptr 
)
noexceptinherited

Definition at line 73 of file usb-host.cpp.

◆ register_port_callback()

void os::driver::usb::Host::register_port_callback ( host::signal_port_event_t  cb_func,
const void *  cb_object = nullptr 
)
noexceptinherited

Register port event callback.

Parameters
[in]cb_funcPointer to callback function.
[in]cb_objectPointer to object to be passed to the function.

Definition at line 65 of file usb-host.cpp.

◆ reset_pipe()

return_t os::driver::usb::Host::reset_pipe ( pipe_t  pipe)
inlinenoexceptinherited

Definition at line 469 of file usb-host.h.

◆ reset_port()

return_t os::driver::usb::Host::reset_port ( port_t  port)
inlinenoexceptinherited

Definition at line 419 of file usb-host.h.

◆ resume_port()

return_t os::driver::usb::Host::resume_port ( port_t  port)
inlinenoexceptinherited

Definition at line 431 of file usb-host.h.

◆ signal_pipe_event()

void os::driver::usb::Host::signal_pipe_event ( pipe_t  pipe,
event_t  event 
)
noexceptinherited

Definition at line 107 of file usb-host.cpp.

◆ signal_port_event()

void os::driver::usb::Host::signal_port_event ( port_t  port,
event_t  event 
)
noexceptinherited

Definition at line 97 of file usb-host.cpp.

◆ suspend_port()

return_t os::driver::usb::Host::suspend_port ( port_t  port)
inlinenoexceptinherited

Definition at line 425 of file usb-host.h.

◆ transfer()

return_t os::driver::usb::Host::transfer ( pipe_t  pipe,
uint32_t  packet,
uint8_t *  data,
std::size_t  num 
)
noexceptinherited

Definition at line 83 of file usb-host.cpp.

Member Data Documentation

◆ c_cb_pipe_func_

ARM_USBH_SignalPipeEvent_t os::driver::usbh_wrapper::c_cb_pipe_func_
private

Definition at line 154 of file usbh-wrapper.h.

◆ c_cb_port_func_

ARM_USBH_SignalPortEvent_t os::driver::usbh_wrapper::c_cb_port_func_
private

Pointer to non-reentrant callback. Must be stored because Initialize() is now delayed just before PowerControl(FULL).

Definition at line 153 of file usbh-wrapper.h.

◆ capa_

usb::host::Capabilities os::driver::usbh_wrapper::capa_
private

Definition at line 165 of file usbh-wrapper.h.

◆ driver_

ARM_DRIVER_USBH* os::driver::usbh_wrapper::driver_
private

Pointer to CMSIS USBD Keil driver.

Definition at line 149 of file usbh-wrapper.h.

◆ status_

usb::host::Status os::driver::usbh_wrapper::status_
private

Definition at line 166 of file usbh-wrapper.h.

◆ version_

Version os::driver::usbh_wrapper::version_ { 0, 0 }
private

Definition at line 164 of file usbh-wrapper.h.


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