Skip to content

Commit b0d55fa

Browse files
NicoHoodfacchinm
authored andcommitted
Precised USB Endpoint definitions
1 parent c455708 commit b0d55fa

File tree

1 file changed

+7
-7
lines changed
  • hardware/arduino/avr/cores/arduino

1 file changed

+7
-7
lines changed

hardware/arduino/avr/cores/arduino/USBAPI.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ typedef unsigned long u32;
4747
//================================================================================
4848
// USB
4949

50-
#define EP_TYPE_CONTROL 0x00
51-
#define EP_TYPE_BULK_IN 0x81
52-
#define EP_TYPE_BULK_OUT 0x80
53-
#define EP_TYPE_INTERRUPT_IN 0xC1
54-
#define EP_TYPE_INTERRUPT_OUT 0xC0
55-
#define EP_TYPE_ISOCHRONOUS_IN 0x41
56-
#define EP_TYPE_ISOCHRONOUS_OUT 0x40
50+
#define EP_TYPE_CONTROL (0x00)
51+
#define EP_TYPE_BULK_IN ((1<<EPTYPE1) | (1<<EPDIR))
52+
#define EP_TYPE_BULK_OUT (1<<EPTYPE1)
53+
#define EP_TYPE_INTERRUPT_IN ((1<<EPTYPE1) | (1<<EPTYPE0) | (1<<EPDIR))
54+
#define EP_TYPE_INTERRUPT_OUT ((1<<EPTYPE1) | (1<<EPTYPE0))
55+
#define EP_TYPE_ISOCHRONOUS_IN ((1<<EPTYPE0) | (1<<EPDIR))
56+
#define EP_TYPE_ISOCHRONOUS_OUT (1<<EPTYPE0)
5757

5858
class USBDevice_
5959
{

0 commit comments

Comments
 (0)