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