Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7bd77de

Browse files
committed
Precised USB Endpoint definitions
1 parent fd6f57d commit 7bd77de

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

Lines changed: 7 additions & 7 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /