|
99 | 99 | /* added option to enable */ |
100 | 100 | /* basic USBX error checking, */ |
101 | 101 | /* resulting in version 6.2.1 */ |
102 | | -/* xx-xx-xxxx Xiuwen Cai Modified comment(s), */ |
| 102 | +/* xx-xx-xxxx Xiuwen Cai, CQ Xiao Modified comment(s), */ |
| 103 | +/* added zero copy support */ |
| 104 | +/* in many device classes, */ |
| 105 | +/* added a new mode to manage */ |
| 106 | +/* endpoint buffer in classes, */ |
103 | 107 | /* added option for get string */ |
104 | 108 | /* requests with zero wIndex, */ |
105 | 109 | /* resulting in version 6.x */ |
|
220 | 224 | /* #define UX_SLAVE_REQUEST_CONTROL_MAX_LENGTH 256 |
221 | 225 | */ |
222 | 226 |
|
| 227 | +/* Defined, this value represents the endpoint buffer owner. |
| 228 | + 0 - The default, endpoint buffer is managed by core stack. Each endpoint takes UX_SLAVE_REQUEST_DATA_MAX_LENGTH bytes. |
| 229 | + 1 - Endpoint buffer managed by classes. In this case not all endpoints consume UX_SLAVE_REQUEST_DATA_MAX_LENGTH bytes. |
| 230 | +*/ |
| 231 | + |
| 232 | +#define UX_DEVICE_ENDPOINT_BUFFER_OWNER 0 |
| 233 | + |
| 234 | +/* Defined, it enables device CDC ACM zero copy for bulk in/out endpoints (write/read). |
| 235 | + Enabled, the endpoint buffer is not allocated in class, application must |
| 236 | + provide the buffer for read/write, and the buffer must meet device controller driver (DCD) |
| 237 | + buffer requirements (e.g., aligned and cache safe). |
| 238 | + It only works if UX_DEVICE_ENDPOINT_BUFFER_OWNER is 1 (endpoint buffer managed by class). |
| 239 | + */ |
| 240 | +/* #define UX_DEVICE_CLASS_CDC_ACM_ZERO_COPY */ |
| 241 | + |
| 242 | +/* Defined, it enables zero copy and flexible queue support (works if HID owns endpoint buffer). |
| 243 | + Enabled, the internal queue buffer is directly used for transfer, the APIs are kept to keep |
| 244 | + backword compatibility, to AVOID KEEPING BUFFERS IN APPLICATION. |
| 245 | + Flexible queue introduces initialization parameter _event_max_number and _event_max_length, |
| 246 | + so each HID function could have different queue settings. |
| 247 | + _event_max_number could be 2 ~ UX_DEVICE_CLASS_HID_MAX_EVENTS_QUEUE. |
| 248 | + Max of _event_max_length could be UX_DEVICE_CLASS_HID_EVENT_BUFFER_LENGTH. |
| 249 | + If the initialization parameters are invalid (are 0s or exceed upper mentioned definition), |
| 250 | + UX_DEVICE_CLASS_HID_MAX_EVENTS_QUEUE and UX_DEVICE_CLASS_HID_EVENT_BUFFER_LENGTH are used to |
| 251 | + calculate and allocate the queue. |
| 252 | + */ |
| 253 | +/* #define UX_DEVICE_CLASS_HID_ZERO_COPY */ |
223 | 254 |
|
224 | 255 | /* Defined, this value represents the maximum number of bytes that can be received or transmitted |
225 | 256 | on any endpoint. This value cannot be less than the maximum packet size of any endpoint. The default |
|
414 | 445 |
|
415 | 446 | /* #define UX_DEVICE_CLASS_AUDIO_FEEDBACK_SUPPORT */ |
416 | 447 |
|
| 448 | +/* Works if UX_DEVICE_ENDPOINT_BUFFER_OWNER is 1. |
| 449 | + Defined, it represents feedback endpoint buffer size. |
| 450 | + It should be larger than feedback endpoint max packet size in framework. */ |
| 451 | +/* #define UX_DEVICE_CLASS_AUDIO_FEEDBACK_ENDPOINT_BUFFER_SIZE 8 */ |
| 452 | + |
417 | 453 | /* Defined, class _write is pending ZLP automatically (complete transfer) after buffer is sent. */ |
418 | 454 |
|
419 | 455 | /* #define UX_DEVICE_CLASS_CDC_ACM_WRITE_AUTO_ZLP */ |
|
0 commit comments