Skip to content

Commit aaec9e2

Browse files
committed
Add USB_ENDPOINTS_MASK
1 parent 17afd65 commit aaec9e2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

hardware/arduino/avr/cores/arduino/USBCore.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ class LockEP
204204
LockEP(u8 ep) : _sreg(SREG)
205205
{
206206
cli();
207-
SetEP(ep & 7);
207+
SetEP(ep & USB_ENDPOINTS_MASK);
208208
}
209209
~LockEP()
210210
{

hardware/arduino/avr/cores/arduino/USBDesc.h

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#else
2424
#define USB_ENDPOINTS 5 // AtMegaxxU2
2525
#endif
26+
#define USB_ENDPOINTS_MASK 7
2627

2728
#define ISERIAL_MAX_LEN 20
2829

0 commit comments

Comments
 (0)