µ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::usb::Host Class Referenceabstract

#include <usb-host.h>

+ Inheritance diagram for os::driver::usb::Host:

Public Member Functions

 Host () noexcept
 
 Host (const Host &)=delete
 
 Host (Host &&)=delete
 
virtual ~Host () noexcept override
 
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::Capabilitiesget_capabilities (void) noexcept
 
uint16_t get_frame_number (void) noexcept
 
host::Statusget_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
 
Hostoperator= (const Host &)=delete
 
Hostoperator= (Host &&)=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 (pipe_t pipe) noexcept=0
 
virtual pipe_t do_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=0
 
virtual return_t do_delete_pipe (pipe_t pipe) noexcept=0
 
virtual const host::Capabilitiesdo_get_capabilities (void) noexcept=0
 
virtual uint16_t do_get_frame_number (void) noexcept=0
 
virtual host::Statusdo_get_port_status (port_t port) noexcept=0
 
virtual std::size_t do_get_transfer_count (pipe_t pipe) noexcept=0
 
virtual const Versiondo_get_version (void) noexcept=0
 
virtual return_t do_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=0
 
virtual return_t do_power (Power state) noexcept=0
 
virtual return_t do_power_port_vbus (port_t port, bool vbus) noexcept=0
 
virtual return_t do_reset_pipe (pipe_t pipe) noexcept=0
 
virtual return_t do_reset_port (port_t port) noexcept=0
 
virtual return_t do_resume_port (port_t port) noexcept=0
 
virtual return_t do_suspend_port (port_t port) noexcept=0
 
virtual return_t do_transfer (pipe_t pipe, uint32_t packet, uint8_t *data, std::size_t num) noexcept=0
 

Protected Attributes

host::Status status_
 

Private Attributes

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.
 

Detailed Description

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

Constructor & Destructor Documentation

◆ Host() [1/3]

os::driver::usb::Host::Host ( )
noexcept

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

◆ Host() [2/3]

os::driver::usb::Host::Host ( const Host )
delete

◆ Host() [3/3]

os::driver::usb::Host::Host ( Host &&  )
delete

◆ ~Host()

os::driver::usb::Host::~Host ( )
overridevirtualnoexcept

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

Member Function Documentation

◆ abort_transfer()

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

Definition at line 491 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 
)
inlinenoexcept

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

◆ delete_pipe()

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

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

◆ do_abort_transfer()

virtual return_t os::driver::usb::Host::do_abort_transfer ( pipe_t  pipe)
protectedpure virtualnoexcept

Implemented in os::driver::usbh_wrapper.

◆ do_create_pipe()

virtual pipe_t os::driver::usb::Host::do_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 
)
protectedpure virtualnoexcept

Implemented in os::driver::usbh_wrapper.

◆ do_delete_pipe()

virtual return_t os::driver::usb::Host::do_delete_pipe ( pipe_t  pipe)
protectedpure virtualnoexcept

Implemented in os::driver::usbh_wrapper.

◆ do_get_capabilities()

virtual const host::Capabilities & os::driver::usb::Host::do_get_capabilities ( void  )
protectedpure virtualnoexcept

Implemented in os::driver::usbh_wrapper.

◆ do_get_frame_number()

virtual uint16_t os::driver::usb::Host::do_get_frame_number ( void  )
protectedpure virtualnoexcept

Implemented in os::driver::usbh_wrapper.

◆ do_get_port_status()

virtual host::Status & os::driver::usb::Host::do_get_port_status ( port_t  port)
protectedpure virtualnoexcept

Implemented in os::driver::usbh_wrapper.

◆ do_get_transfer_count()

virtual std::size_t os::driver::usb::Host::do_get_transfer_count ( pipe_t  pipe)
protectedpure virtualnoexcept

Implemented in os::driver::usbh_wrapper.

◆ do_get_version()

virtual const Version & os::driver::Base::do_get_version ( void  )
protectedpure virtualnoexceptinherited

◆ do_modify_pipe()

virtual return_t os::driver::usb::Host::do_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 
)
protectedpure virtualnoexcept

Implemented in os::driver::usbh_wrapper.

◆ do_power()

virtual return_t os::driver::Base::do_power ( Power  state)
protectedpure virtualnoexceptinherited

◆ do_power_port_vbus()

virtual return_t os::driver::usb::Host::do_power_port_vbus ( port_t  port,
bool  vbus 
)
protectedpure virtualnoexcept

Implemented in os::driver::usbh_wrapper.

◆ do_reset_pipe()

virtual return_t os::driver::usb::Host::do_reset_pipe ( pipe_t  pipe)
protectedpure virtualnoexcept

Implemented in os::driver::usbh_wrapper.

◆ do_reset_port()

virtual return_t os::driver::usb::Host::do_reset_port ( port_t  port)
protectedpure virtualnoexcept

Implemented in os::driver::usbh_wrapper.

◆ do_resume_port()

virtual return_t os::driver::usb::Host::do_resume_port ( port_t  port)
protectedpure virtualnoexcept

Implemented in os::driver::usbh_wrapper.

◆ do_suspend_port()

virtual return_t os::driver::usb::Host::do_suspend_port ( port_t  port)
protectedpure virtualnoexcept

Implemented in os::driver::usbh_wrapper.

◆ do_transfer()

virtual return_t os::driver::usb::Host::do_transfer ( pipe_t  pipe,
uint32_t  packet,
uint8_t *  data,
std::size_t  num 
)
protectedpure virtualnoexcept

Implemented in os::driver::usbh_wrapper.

◆ get_capabilities()

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

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

◆ get_frame_number()

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

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

◆ get_port_status()

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

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

◆ get_transfer_count()

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

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

◆ get_version()

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

Get driver version.

Returns
Version.

Definition at line 195 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 
)
inlinenoexcept

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

◆ operator=() [1/2]

Host & os::driver::usb::Host::operator= ( const Host )
delete

◆ operator=() [2/2]

Host & os::driver::usb::Host::operator= ( Host &&  )
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 201 of file common.h.

◆ power_port_vbus()

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

Definition at line 423 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 
)
noexcept

Definition at line 64 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 
)
noexcept

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 56 of file usb-host.cpp.

◆ reset_pipe()

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

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

◆ reset_port()

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

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

◆ resume_port()

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

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

◆ signal_pipe_event()

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

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

◆ signal_port_event()

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

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

◆ suspend_port()

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

Definition at line 435 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 
)
noexcept

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

Member Data Documentation

◆ cb_pipe_func_

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

Pointer to static function that implements the pipe callback.

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

◆ cb_pipe_object_

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

Pointer to object instance associated with the pipe callback.

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

◆ cb_port_func_

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

Pointer to static function that implements the port callback.

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

◆ cb_port_object_

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

Pointer to object instance associated with the port callback.

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

◆ status_

host::Status os::driver::usb::Host::status_
protected

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


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