@@ -60,7 +60,7 @@ typedef struct {
6060static usbd_control_xfer_t _ctrl_xfer ;
6161
6262CFG_TUD_MEM_SECTION static struct {
63- TUD_EPBUF_DEF (buf , CFG_TUD_ENDPOINT0_SIZE );
63+ TUD_EPBUF_DEF (buf , CFG_TUD_EP0_BUFSIZE );
6464} _ctrl_epbuf ;
6565
6666//--------------------------------------------------------------------+
@@ -88,13 +88,13 @@ bool tud_control_status(uint8_t rhport, const tusb_control_request_t* request) {
8888// Each transaction has up to Endpoint0's max packet size.
8989// This function can also transfer an zero-length packet
9090static bool data_stage_xact (uint8_t rhport ) {
91- const uint16_t xact_len = tu_min16 (_ctrl_xfer .data_len - _ctrl_xfer .total_xferred , CFG_TUD_ENDPOINT0_SIZE );
91+ const uint16_t xact_len = tu_min16 (_ctrl_xfer .data_len - _ctrl_xfer .total_xferred , CFG_TUD_EP0_BUFSIZE );
9292 uint8_t ep_addr = EDPT_CTRL_OUT ;
9393
9494 if (_ctrl_xfer .request .bmRequestType_bit .direction == TUSB_DIR_IN ) {
9595 ep_addr = EDPT_CTRL_IN ;
9696 if (xact_len ) {
97- TU_VERIFY (0 == tu_memcpy_s (_ctrl_epbuf .buf , CFG_TUD_ENDPOINT0_SIZE , _ctrl_xfer .buffer , xact_len ));
97+ TU_VERIFY (0 == tu_memcpy_s (_ctrl_epbuf .buf , CFG_TUD_EP0_BUFSIZE , _ctrl_xfer .buffer , xact_len ));
9898 }
9999 }
100100
@@ -179,7 +179,7 @@ bool usbd_control_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result,
179179 // Data Stage is complete when all request's length are transferred or
180180 // a short packet is sent including zero-length packet.
181181 if ((_ctrl_xfer .request .wLength == _ctrl_xfer .total_xferred ) ||
182- (xferred_bytes < CFG_TUD_ENDPOINT0_SIZE )) {
182+ (xferred_bytes < CFG_TUD_EP0_BUFSIZE )) {
183183 // DATA stage is complete
184184 bool is_ok = true;
185185
0 commit comments