µOS++ IIIe Reference 7.0.0
The third edition of µOS++, a POSIX inspired open source framework, written in C++
Loading...
Searching...
No Matches
os::driver::usbh_wrapper Class Reference

#include <usbh-wrapper.h>

+ Inheritance diagram for os::driver::usbh_wrapper:

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.
 
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.
 
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.
 
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_
 
host::signal_pipe_event_t cb_pipe_func_
 Pointer to static function that implements the pipe callback.
 
const void * cb_pipe_object_
 Pointer to object instance associated with the pipe callback.
 
host::signal_port_event_t cb_port_func_
 Pointer to static function that implements the port callback.
 
const void * cb_port_object_
 Pointer to object instance associated with the port callback.
 
ARM_DRIVER_USBHdriver_
 Pointer to CMSIS USBD Keil driver.
 
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 493 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 455 of file usb-host.h.

◆ delete_pipe()

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

Definition at line 475 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 419 of file usb-host.h.

◆ get_frame_number()

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

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

◆ get_port_status()

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

Definition at line 449 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 487 of file usb-host.h.

◆ get_version()

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

Get driver version.

Returns
Version.

Definition at line 213 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 466 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 219 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 425 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 79 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 71 of file usb-host.cpp.

◆ reset_pipe()

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

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

◆ reset_port()

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

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

◆ resume_port()

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

Definition at line 443 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 113 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 103 of file usb-host.cpp.

◆ suspend_port()

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

Definition at line 437 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 89 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.

◆ cb_pipe_func_

host::signal_pipe_event_t os::driver::usb::Host::cb_pipe_func_
privateinherited

Pointer to static function that implements the pipe callback.

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

◆ cb_pipe_object_

const void* os::driver::usb::Host::cb_pipe_object_
privateinherited

Pointer to object instance associated with the pipe callback.

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

◆ cb_port_func_

host::signal_port_event_t os::driver::usb::Host::cb_port_func_
privateinherited

Pointer to static function that implements the port callback.

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

◆ cb_port_object_

const void* os::driver::usb::Host::cb_port_object_
privateinherited

Pointer to object instance associated with the port callback.

Definition at line 374 of file usb-host.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 163 of file usbh-wrapper.h.


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