X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=megadrive.git;a=blobdiff_plain;f=teensy3%2Fusb_dev.h;h=678446a98dda9d271d7ab88fe5fa7c49bd3a898c;hp=eca9775524c9e84d1a821f01d8f463f5a44ffa05;hb=a773ac06cdc55be51ebc0bc61aa6066b54746c7d;hpb=f359b935ea6628421393610cf14f9fe6887b0d4c diff --git a/teensy3/usb_dev.h b/teensy3/usb_dev.h index eca9775..678446a 100644 --- a/teensy3/usb_dev.h +++ b/teensy3/usb_dev.h @@ -10,10 +10,10 @@ * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * - * 1. The above copyright notice and this permission notice shall be + * 1. The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * - * 2. If the Software is incorporated into a build system that allows + * 2. If the Software is incorporated into a build system that allows * selection among a list of target devices, then similar target * devices manufactured by PJRC.COM must be included in the list of * target devices and selectable in the same manner. @@ -31,13 +31,15 @@ #ifndef _usb_dev_h_ #define _usb_dev_h_ +#include "usb_desc.h" +#if F_CPU >= 20000000 && defined(NUM_ENDPOINTS) + // This header is NOT meant to be included when compiling // user sketches in Arduino. The low-level functions // provided by usb_dev.c are meant to be called only by // code which provides higher-level interfaces to the user. #include "usb_mem.h" -#include "usb_desc.h" #ifdef __cplusplus extern "C" { @@ -96,10 +98,23 @@ extern void usb_flightsim_flush_callback(void); +#ifdef __cplusplus +} +#endif + +#else // F_CPU >= 20000000 && defined(NUM_ENDPOINTS) + +#ifdef __cplusplus +extern "C" { +#endif + +void usb_init(void); + #ifdef __cplusplus } #endif +#endif // F_CPU >= 20000000 && defined(NUM_ENDPOINTS) #endif