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" 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;
86 bool _abort_transfer_test;
87 usb_ep_t _endpoints[NUM_ENDPOINTS];
88 uint8_t *_endpoint_buffs[NUM_ENDPOINTS];
98 volatile uint32_t _cnt_cb_set_conf;
99 volatile uint32_t _cnt_cb_set_intf;
100 volatile uint32_t _cnt_cb_bulk_out;
101 volatile uint32_t _cnt_cb_bulk_in;
102 volatile uint32_t _cnt_cb_int_out;
103 volatile uint32_t _cnt_cb_int_in;
104 volatile uint32_t _cnt_cb_iso_out;
105 volatile uint32_t _cnt_cb_iso_in;
107 volatile uint32_t _num_packets_bulk_out_abort;
108 volatile uint32_t _num_packets_bulk_in_abort;
109 volatile uint32_t _num_packets_int_out_abort;
110 volatile uint32_t _num_packets_int_in_abort;
112 virtual const uint8_t *configuration_desc(uint8_t index);
116 virtual void callback_set_configuration(uint8_t configuration);
117 virtual void callback_set_interface(uint16_t interface, uint8_t alternate);
119 void _setup_non_zero_endpoints();
120 bool _setup_interface(uint16_t interface, uint8_t alternate);
122 virtual void _cb_bulk_out();
123 virtual void _cb_bulk_in();
124 virtual void _cb_int_out();
125 virtual void _cb_int_in();
126 virtual void _cb_iso_out();
127 virtual void _cb_iso_in();
130 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.