18 #ifndef USB_ENDPOINT_TESTER_H 19 #define USB_ENDPOINT_TESTER_H 22 #include "USBDescriptor.h" 23 #include "USBDevice_Types.h" 24 #include "events/EventQueue.h" 25 #include "EventFlags.h" 26 #include "platform/NonCopyable.h" 28 #include "USBDevice.h" 30 #define NUM_ENDPOINTS 6 // Not including CTRL OUT/IN 36 bool abort_transfer_test);
38 const char *get_serial_desc_string();
39 void start_ep_in_abort_test();
41 uint32_t get_cnt_cb_set_conf()
const 43 return _cnt_cb_set_conf;
45 uint32_t get_cnt_cb_set_intf()
const 47 return _cnt_cb_set_intf;
49 uint32_t get_cnt_cb_bulk_out()
const 51 return _cnt_cb_bulk_out;
53 uint32_t get_cnt_cb_bulk_in()
const 55 return _cnt_cb_bulk_in;
57 uint32_t get_cnt_cb_int_out()
const 59 return _cnt_cb_int_out;
61 uint32_t get_cnt_cb_int_in()
const 63 return _cnt_cb_int_in;
65 uint32_t get_cnt_cb_iso_out()
const 67 return _cnt_cb_iso_out;
69 uint32_t get_cnt_cb_iso_in()
const 71 return _cnt_cb_iso_in;
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...
Prevents generation of copy constructor and copy assignment operator in derived classes.
Abstract interface to physical USB hardware.
virtual void callback_state_change(DeviceState new_state)
Called when USB changes state.