21#include "USBPhyTypes.h"
22#include "USBPhyEvents.h"
206 virtual void ep0_read(uint8_t *data, uint32_t size) = 0;
221 virtual void ep0_write(uint8_t *buffer, uint32_t size) = 0;
242 virtual bool endpoint_add(usb_ep_t endpoint, uint32_t max_packet, usb_ep_type_t type) = 0;
280 virtual bool endpoint_read(usb_ep_t endpoint, uint8_t *data, uint32_t size) = 0;
298 virtual bool endpoint_write(usb_ep_t endpoint, uint8_t *data, uint32_t size) = 0;
Event handler for USBPhy.
Abstract interface to physical USB hardware.
virtual void set_address(uint8_t address)=0
Set the USBPhy's address.
virtual void deinit()=0
Power down this USBPhy instance.
virtual void process()=0
Callback used for performing USB processing.
virtual bool endpoint_read(usb_ep_t endpoint, uint8_t *data, uint32_t size)=0
Start a read on the given endpoint.
virtual const usb_ep_table_t * endpoint_table()=0
Get the endpoint table.
virtual void endpoint_remove(usb_ep_t endpoint)=0
Disable an endpoint.
virtual void endpoint_unstall(usb_ep_t endpoint)=0
Un-stall the endpoint.
virtual uint32_t endpoint_read_result(usb_ep_t endpoint)=0
Finish a read on the given endpoint.
virtual void connect()=0
Make the USB phy visible to the USB host.
virtual void remote_wakeup()=0
Wake upstream devices.
virtual uint32_t ep0_set_max_packet(uint32_t max_packet)=0
Set wMaxPacketSize of endpoint 0.
virtual bool powered()=0
Check if USB power is present.
virtual void unconfigure()=0
Leave the configured state.
virtual uint32_t ep0_read_result()=0
Read the contents of a received packet.
virtual bool endpoint_write(usb_ep_t endpoint, uint8_t *data, uint32_t size)=0
Start a write on the given endpoint.
virtual void ep0_setup_read_result(uint8_t *buffer, uint32_t size)=0
Read the contents of the SETUP packet.
virtual void sof_disable()=0
Disable the start of frame interrupt.
virtual void sof_enable()=0
Enable the start of frame interrupt.
virtual void ep0_stall()=0
Protocol stall on endpoint 0.
virtual void init(USBPhyEvents *events)=0
Initialize this USBPhy instance.
virtual void endpoint_stall(usb_ep_t endpoint)=0
Perform a functional stall on the given endpoint.
virtual void disconnect()=0
Detach the USB phy.
virtual bool endpoint_add(usb_ep_t endpoint, uint32_t max_packet, usb_ep_type_t type)=0
Configure and enable an endpoint.
virtual void configure()=0
Set this device to the configured state.
virtual void endpoint_abort(usb_ep_t endpoint)=0
Abort the current transfer if it has not yet been sent.
virtual void ep0_write(uint8_t *buffer, uint32_t size)=0
Write a packet on endpoint 0.
virtual void ep0_read(uint8_t *data, uint32_t size)=0
Start receiving a packet of up to wMaxPacketSize on endpoint 0.