18 #ifndef USB_ENDPOINT_TESTER_H 19 #define USB_ENDPOINT_TESTER_H 22 #include "USBDescriptor.h" 23 #include "USBDevice_Types.h" 24 #include "EventQueue.h" 25 #include "EventFlags.h" 27 #include "USBDevice.h" 29 #define NUM_ENDPOINTS 6 // Not including CTRL OUT/IN 35 bool abort_transfer_test);
37 const char *get_serial_desc_string();
38 void start_ep_in_abort_test();
40 uint32_t get_cnt_cb_set_conf()
const 42 return _cnt_cb_set_conf;
44 uint32_t get_cnt_cb_set_intf()
const 46 return _cnt_cb_set_intf;
48 uint32_t get_cnt_cb_bulk_out()
const 50 return _cnt_cb_bulk_out;
52 uint32_t get_cnt_cb_bulk_in()
const 54 return _cnt_cb_bulk_in;
56 uint32_t get_cnt_cb_int_out()
const 58 return _cnt_cb_int_out;
60 uint32_t get_cnt_cb_int_in()
const 62 return _cnt_cb_int_in;
64 uint32_t get_cnt_cb_iso_out()
const 66 return _cnt_cb_iso_out;
68 uint32_t get_cnt_cb_iso_in()
const 70 return _cnt_cb_iso_in;
83 uint8_t ctrl_buf[2048];
85 bool _abort_transfer_test;
86 usb_ep_t _endpoints[NUM_ENDPOINTS];
87 uint8_t *_endpoint_buffs[NUM_ENDPOINTS];
97 volatile uint32_t _cnt_cb_set_conf;
98 volatile uint32_t _cnt_cb_set_intf;
99 volatile uint32_t _cnt_cb_bulk_out;
100 volatile uint32_t _cnt_cb_bulk_in;
101 volatile uint32_t _cnt_cb_int_out;
102 volatile uint32_t _cnt_cb_int_in;
103 volatile uint32_t _cnt_cb_iso_out;
104 volatile uint32_t _cnt_cb_iso_in;
106 volatile uint32_t _num_packets_bulk_out_abort;
107 volatile uint32_t _num_packets_bulk_in_abort;
108 volatile uint32_t _num_packets_int_out_abort;
109 volatile uint32_t _num_packets_int_in_abort;
111 virtual const uint8_t *configuration_desc(uint8_t index);
115 virtual void callback_set_configuration(uint8_t configuration);
116 virtual void callback_set_interface(uint16_t interface, uint8_t alternate);
118 void _setup_non_zero_endpoints();
119 bool _setup_interface(uint16_t interface, uint8_t alternate);
121 virtual void _cb_bulk_out();
122 virtual void _cb_bulk_in();
123 virtual void _cb_int_out();
124 virtual void _cb_int_in();
125 virtual void _cb_iso_out();
126 virtual void _cb_iso_in();
129 const char *get_desc_string(
const uint8_t *desc);
virtual void callback_request_xfer_done(const setup_packet_t *setup, bool aborted)
Called by USBDevice on data stage completion.
virtual void callback_request(const setup_packet_t *setup)
Called by USBDevice on Endpoint0 request.
The EventFlags class is used to control event flags or wait for event flags other threads control...
Abstract interface to physical USB hardware.
virtual void callback_state_change(DeviceState new_state)
Called when USB changes state.