22 #include "USBDescriptor.h" 23 #include "USBDevice_Types.h" 24 #include "EventQueue.h" 25 #include "EventFlags.h" 26 #include "platform/NonCopyable.h" 28 #include "USBDevice.h" 40 USBTester(
USBPhy *phy, uint16_t vendor_id, uint16_t product_id, uint16_t product_release);
48 const char *get_serial_desc_string();
49 const char *get_iproduct_desc_string();
50 const char *get_iinterface_desc_string();
51 uint32_t get_reset_count()
const 55 uint32_t get_suspend_count()
const 59 uint32_t get_resume_count()
const 63 void clear_reset_count()
67 void clear_suspend_count()
71 void clear_resume_count()
79 const char *get_desc_string(
const uint8_t *desc);
80 virtual void suspend(
bool suspended);
81 bool set_configuration(uint16_t configuration);
82 bool set_interface(uint16_t interface, uint16_t alternate);
83 bool setup_iterface(uint8_t ep_in, uint8_t ep_out, uint32_t ep_size, usb_ep_type_t ep_type,
85 void remove_iterface(uint16_t interface);
86 int16_t interface_0_alt_set;
87 int16_t interface_1_alt_set;
88 int16_t configuration_set;
97 virtual const uint8_t *device_desc();
104 virtual const uint8_t *string_iproduct_desc();
111 virtual const uint8_t *string_iinterface_desc();
119 virtual const uint8_t *configuration_desc(uint8_t index);
124 uint8_t bulk_buf[64];
130 volatile uint32_t reset_count;
131 volatile uint32_t suspend_count;
132 volatile uint32_t resume_count;
137 virtual void callback_set_configuration(uint8_t configuration);
138 virtual void callback_set_interface(uint16_t interface, uint8_t alternate);
139 virtual void epbulk_out_callback();
140 virtual void epint_out_callback();
The EventFlags class is used to control event flags or wait for event flags other threads control...
virtual void callback_reset()
Called by USBDevice layer on bus reset.
Prevents generation of copy constructor and copy assignment operator in derived classes.
Abstract interface to physical USB hardware.
virtual void callback_request(const setup_packet_t *setup)
Called by USBDevice on Endpoint0 request.
virtual void callback_state_change(DeviceState new_state)
Called when USB changes state.
virtual void callback_request_xfer_done(const setup_packet_t *setup, bool aborted)
Called by USBDevice on data stage completion.