34#ifndef CMSIS_PLUS_DRIVER_USB_HOST_H_
35#define CMSIS_PLUS_DRIVER_USB_HOST_H_
51#pragma GCC diagnostic push
54#pragma clang diagnostic ignored "-Wc++98-compat"
69#pragma GCC diagnostic push
70#pragma GCC diagnostic ignored "-Wpadded"
98#pragma GCC diagnostic pop
103#pragma GCC diagnostic push
104#pragma GCC diagnostic ignored "-Wpadded"
139#pragma GCC diagnostic pop
219#pragma GCC diagnostic push
220#pragma GCC diagnostic ignored "-Wpadded"
242 ~Host () noexcept override;
253 const
void* cb_object =
nullptr) noexcept;
257 const
void* cb_object =
nullptr) noexcept;
261 const host::Capabilities&
318 virtual const host::Capabilities&
333 virtual host::Status&
357 std::
size_t num) noexcept = 0;
387#pragma GCC diagnostic pop
397 Status::is_connected (
void)
const noexcept
403 Status::is_overcurrent (
void)
const noexcept
409 Status::get_speed (
void)
const noexcept
461 return do_create_pipe (dev_addr, dev_speed, hub_addr, hub_port, ep_addr,
462 ep_type, ep_max_packet_size, ep_interval);
470 return do_modify_pipe (pipe, dev_addr, dev_speed, hub_addr, hub_port,
508#pragma GCC diagnostic pop
Host(const Host &)=delete
virtual return_t do_power_port_vbus(port_t port, bool vbus) noexcept=0
host::signal_port_event_t cb_port_func_
Pointer to static function that implements the port callback.
virtual return_t do_suspend_port(port_t port) noexcept=0
return_t reset_port(port_t port) noexcept
return_t delete_pipe(pipe_t pipe) noexcept
Host & operator=(const Host &)=delete
const host::Capabilities & get_capabilities(void) noexcept
virtual host::Status & do_get_port_status(port_t port) noexcept=0
virtual return_t do_reset_pipe(pipe_t pipe) noexcept=0
virtual return_t do_delete_pipe(pipe_t pipe) noexcept=0
host::Status & get_port_status(port_t port) 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
void register_port_callback(host::signal_port_event_t cb_func, const void *cb_object=nullptr) noexcept
Register port event callback.
virtual return_t do_resume_port(port_t port) noexcept=0
void signal_pipe_event(pipe_t pipe, event_t event) noexcept
virtual uint16_t do_get_frame_number(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
host::signal_pipe_event_t cb_pipe_func_
Pointer to static function that implements the pipe callback.
return_t transfer(pipe_t pipe, uint32_t packet, uint8_t *data, std::size_t num) noexcept
return_t power_port_vbus(port_t port, bool vbus) noexcept
return_t resume_port(port_t port) noexcept
virtual return_t do_abort_transfer(pipe_t pipe) noexcept=0
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
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
const void * cb_pipe_object_
Pointer to object instance associated with the pipe callback.
virtual const host::Capabilities & do_get_capabilities(void) noexcept=0
virtual std::size_t do_get_transfer_count(pipe_t pipe) noexcept=0
return_t suspend_port(port_t port) noexcept
const void * cb_port_object_
Pointer to object instance associated with the port callback.
return_t reset_pipe(pipe_t pipe) noexcept
std::size_t get_transfer_count(pipe_t pipe) noexcept
uint16_t get_frame_number(void) noexcept
virtual return_t do_reset_port(port_t port) noexcept=0
virtual ~Host() noexcept override
void register_pipe_callback(host::signal_pipe_event_t cb_func, const void *cb_object=nullptr) noexcept
void signal_port_event(port_t port, event_t event) noexcept
return_t abort_transfer(pipe_t pipe) noexcept
virtual return_t do_transfer(pipe_t pipe, uint32_t packet, uint8_t *data, std::size_t num) noexcept=0
USB host driver capabilities.
bool event_connect
Signal Disconnect event.
uint32_t port_mask
< Root HUB available Ports Mask
bool auto_split
Signal Connect event.
bool event_disconnect
Signal Overcurrent event.
speed_t get_speed(void) const noexcept
bool is_connected(void) const noexcept
bool is_overcurrent(void) const noexcept
bool overcurrent
USB Host Port speed setting (ARM_USB_SPEED_xxx)
bool connected
< USB Host Port connected flag
Port_event
USB Host Port Events.
@ resume
USB Device activated Remote Wakeup.
@ disconnect
USB Device caused Overcurrent.
@ suspend
USB Resume occurred.
@ overcurrent
USB Reset completed.
@ connect
USB Device Connected to Port.
@ reset
USB Suspend occurred.
void(* signal_pipe_event_t)(const void *object, pipe_t pipe, event_t event)
Pipe_event
USB Host Pipe Event.
@ handshake_nak
NYET Handshake received.
@ transfer_complete
Transfer completed.
@ handshake_stall
ERR Handshake received.
@ handshake_err
Bus Error detected.
@ handshake_mdata
STALL Handshake received.
@ handshake_nyet
MDATA Handshake received.
void(* signal_port_event_t)(const void *object, port_t port, event_t event)
uint8_t polling_interval_t