mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-06 01:08:25 +01:00
support for non-Leonardo boards is back!
This commit is contained in:
parent
0b3acaea21
commit
6049e4455a
@ -20,6 +20,7 @@
|
|||||||
#include "USBAPI.h"
|
#include "USBAPI.h"
|
||||||
#include <avr/wdt.h>
|
#include <avr/wdt.h>
|
||||||
|
|
||||||
|
#if defined(USBCON)
|
||||||
#ifdef CDC_ENABLED
|
#ifdef CDC_ENABLED
|
||||||
|
|
||||||
// TODO: Should really use the wdt here
|
// TODO: Should really use the wdt here
|
||||||
@ -174,3 +175,4 @@ size_t Serial_::write(uint8_t c)
|
|||||||
Serial_ Serial;
|
Serial_ Serial;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* if defined(USBCON) */
|
@ -20,6 +20,7 @@
|
|||||||
#include "USBAPI.h"
|
#include "USBAPI.h"
|
||||||
#include "USBDesc.h"
|
#include "USBDesc.h"
|
||||||
|
|
||||||
|
#if defined(USBCON)
|
||||||
#ifdef HID_ENABLED
|
#ifdef HID_ENABLED
|
||||||
|
|
||||||
//#define RAWHID_ENABLED
|
//#define RAWHID_ENABLED
|
||||||
@ -420,3 +421,5 @@ size_t Keyboard_::write(uint8_t c)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* if defined(USBCON) */
|
@ -14,8 +14,10 @@ typedef unsigned long u32;
|
|||||||
|
|
||||||
#include "Arduino.h"
|
#include "Arduino.h"
|
||||||
|
|
||||||
#include "USBDesc.h"
|
#if defined(USBCON)
|
||||||
#include "USBCore.h"
|
#include "USBDesc.h"
|
||||||
#include "USBAPI.h"
|
#include "USBCore.h"
|
||||||
|
#include "USBAPI.h"
|
||||||
|
#endif /* if defined(USBCON) */
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
#ifndef __USBAPI__
|
#ifndef __USBAPI__
|
||||||
#define __USBAPI__
|
#define __USBAPI__
|
||||||
|
|
||||||
|
#if defined(USBCON)
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
//================================================================================
|
//================================================================================
|
||||||
// USB
|
// USB
|
||||||
@ -154,3 +156,5 @@ int USB_Recv(uint8_t ep); // non-blocking
|
|||||||
void USB_Flush(uint8_t ep);
|
void USB_Flush(uint8_t ep);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* if defined(USBCON) */
|
@ -20,6 +20,8 @@
|
|||||||
#include "USBAPI.h"
|
#include "USBAPI.h"
|
||||||
#include "USBDesc.h"
|
#include "USBDesc.h"
|
||||||
|
|
||||||
|
#if defined(USBCON)
|
||||||
|
|
||||||
#define EP_TYPE_CONTROL 0x00
|
#define EP_TYPE_CONTROL 0x00
|
||||||
#define EP_TYPE_BULK_IN 0x81
|
#define EP_TYPE_BULK_IN 0x81
|
||||||
#define EP_TYPE_BULK_OUT 0x80
|
#define EP_TYPE_BULK_OUT 0x80
|
||||||
@ -649,3 +651,5 @@ void USB_::poll()
|
|||||||
MSC_Data(MSC_RX,MSC_TX);
|
MSC_Data(MSC_RX,MSC_TX);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* if defined(USBCON) */
|
Loading…
x
Reference in New Issue
Block a user