File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 48
48
#define ENDPOINT_ENABLED (1 << 0 )
49
49
#define ENDPOINT_STALLED (1 << 1 )
50
50
51
+ /* The maximum wMaxPacketSize for endpoint 0 */
51
52
#if defined(MAX_PACKET_SIZE_EP0)
52
53
#undef MAX_PACKET_SIZE_EP0
53
54
#endif
@@ -663,7 +664,7 @@ void USBDevice::_control_setup()
663
664
/* Control transfer setup stage */
664
665
uint8_t buffer[MAX_PACKET_SIZE_EP0];
665
666
666
- _phy->ep0_setup_read_result (buffer, MAX_PACKET_SIZE_EP0 );
667
+ _phy->ep0_setup_read_result (buffer, _max_packet_size_ep0 );
667
668
668
669
/* Initialise control transfer state */
669
670
_decode_setup_packet (buffer, &_transfer.setup );
@@ -805,7 +806,7 @@ void USBDevice::_control_setup_continue()
805
806
/* the end of this transfer */
806
807
if (_transfer.setup .wLength > _transfer.remaining ) {
807
808
/* Device wishes to transfer less than host requested */
808
- if ((_transfer.remaining % MAX_PACKET_SIZE_EP0 ) == 0 ) {
809
+ if ((_transfer.remaining % _max_packet_size_ep0 ) == 0 ) {
809
810
/* Transfer is a multiple of EP0 max packet size */
810
811
_transfer.zlp = true ;
811
812
}
You can’t perform that action at this time.
0 commit comments