From 77cc20f11904cb46b509f69ad9e856b5ad9eb253 Mon Sep 17 00:00:00 2001 From: NicoHood Date: Fri, 7 Aug 2015 19:39:06 +0200 Subject: Added missing static inline to USB Recv function --- cores/arduino/USBCore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cores/arduino/USBCore.cpp') diff --git a/cores/arduino/USBCore.cpp b/cores/arduino/USBCore.cpp index 8237ccb..05e2f24 100644 --- a/cores/arduino/USBCore.cpp +++ b/cores/arduino/USBCore.cpp @@ -110,7 +110,7 @@ static inline void ClearOUT(void) UEINTX = ~(1< Date: Fri, 7 Aug 2015 19:45:18 +0200 Subject: Added 16 byte endpoint support --- cores/arduino/USBCore.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cores/arduino/USBCore.cpp') diff --git a/cores/arduino/USBCore.cpp b/cores/arduino/USBCore.cpp index 05e2f24..fd25793 100644 --- a/cores/arduino/USBCore.cpp +++ b/cores/arduino/USBCore.cpp @@ -253,7 +253,7 @@ u8 USB_SendSpace(u8 ep) LockEP lock(ep); if (!ReadWriteAllowed()) return 0; - return 64 - FifoByteCount(); + return USB_EP_SIZE - FifoByteCount(); } // Blocking Send of data to an endpoint @@ -326,6 +326,7 @@ u8 _initEndpoints[] = #define EP_SINGLE_64 0x32 // EP0 #define EP_DOUBLE_64 0x36 // Other endpoints +#define EP_SINGLE_16 0x12 static void InitEP(u8 index, u8 type, u8 size) @@ -344,7 +345,13 @@ void InitEndpoints() UENUM = i; UECONX = (1< Date: Fri, 7 Aug 2015 19:47:37 +0200 Subject: Added u2 Series support --- cores/arduino/USBCore.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'cores/arduino/USBCore.cpp') diff --git a/cores/arduino/USBCore.cpp b/cores/arduino/USBCore.cpp index fd25793..f12d326 100644 --- a/cores/arduino/USBCore.cpp +++ b/cores/arduino/USBCore.cpp @@ -627,13 +627,19 @@ void USB_Flush(u8 ep) static inline void USB_ClockDisable() { +#if defined(OTGPADE) USBCON = (USBCON & ~(1<