22 #include "USBDescriptor.h" 23 #include "USBDevice_Types.h" 24 #include "EventQueue.h" 25 #include "EventFlags.h" 27 #include "USBDevice.h" 39 USBTester(
USBPhy *phy, uint16_t vendor_id, uint16_t product_id, uint16_t product_release);
47 const char *get_serial_desc_string();
48 const char *get_iproduct_desc_string();
49 const char *get_iinterface_desc_string();
50 uint32_t get_reset_count()
const 54 uint32_t get_suspend_count()
const 58 uint32_t get_resume_count()
const 62 void clear_reset_count()
66 void clear_suspend_count()
70 void clear_resume_count()
78 const char *get_desc_string(
const uint8_t *desc);
79 virtual void suspend(
bool suspended);
80 bool set_configuration(uint16_t configuration);
81 bool set_interface(uint16_t interface, uint16_t alternate);
82 bool setup_iterface(uint8_t ep_in, uint8_t ep_out, uint32_t ep_size, usb_ep_type_t ep_type,
84 void remove_iterface(uint16_t interface);
85 int16_t interface_0_alt_set;
86 int16_t interface_1_alt_set;
87 int16_t configuration_set;
96 virtual const uint8_t *device_desc();
103 virtual const uint8_t *string_iproduct_desc();
110 virtual const uint8_t *string_iinterface_desc();
118 virtual const uint8_t *configuration_desc(uint8_t index);
123 uint8_t bulk_buf[64];
129 volatile uint32_t reset_count;
130 volatile uint32_t suspend_count;
131 volatile uint32_t resume_count;
136 virtual void callback_set_configuration(uint8_t configuration);
137 virtual void callback_set_interface(uint16_t interface, uint8_t alternate);
138 virtual void epbulk_out_callback();
139 virtual void epint_out_callback();
141 uint8_t ctrl_buf[2048];
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.
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.