| @@ -31,8 +31,6 @@ | |||
| #ifndef _usb_desc_h_ | |||
| #define _usb_desc_h_ | |||
| #if F_CPU >= 20000000 | |||
| // 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 | |||
| @@ -324,6 +322,4 @@ extern const usb_descriptor_list_t usb_descriptor_list[]; | |||
| #endif // NUM_ENDPOINTS | |||
| #endif // USB_DESC_LIST_DEFINE | |||
| #endif // F_CPU >= 20 MHz | |||
| #endif | |||
| @@ -34,6 +34,7 @@ | |||
| #include <string.h> // for memcpy() | |||
| #ifdef FLIGHTSIM_INTERFACE // defined by usb_dev.h -> usb_desc.h | |||
| #if F_CPU >= 20000000 | |||
| FlightSimCommand * FlightSimCommand::first = NULL; | |||
| FlightSimCommand * FlightSimCommand::last = NULL; | |||
| @@ -364,4 +365,5 @@ void usb_flightsim_flush_callback(void) | |||
| } | |||
| } | |||
| #endif // F_CPU | |||
| #endif // FLIGHTSIM_INTERFACE | |||
| @@ -35,7 +35,7 @@ | |||
| #include <string.h> // for memcpy() | |||
| #ifdef JOYSTICK_INTERFACE // defined by usb_dev.h -> usb_desc.h | |||
| #if F_CPU >= 20000000 | |||
| uint32_t usb_joystick_data[3]; | |||
| @@ -99,5 +99,5 @@ int usb_joystick_send(void) | |||
| #endif // F_CPU | |||
| #endif // JOYSTICK_INTERFACE | |||
| @@ -36,7 +36,7 @@ | |||
| #include <string.h> // for memcpy() | |||
| #ifdef KEYBOARD_INTERFACE // defined by usb_dev.h -> usb_desc.h | |||
| #if F_CPU >= 20000000 | |||
| // which modifier keys are currently pressed | |||
| // 1=left ctrl, 2=left shift, 4=left alt, 8=left gui | |||
| @@ -508,4 +508,5 @@ int usb_keyboard_send(void) | |||
| } | |||
| #endif // F_CPU | |||
| #endif // KEYBOARD_INTERFACE | |||
| @@ -34,7 +34,7 @@ | |||
| #include "HardwareSerial.h" | |||
| #ifdef MIDI_INTERFACE // defined by usb_dev.h -> usb_desc.h | |||
| #if F_CPU >= 20000000 | |||
| uint8_t usb_midi_msg_channel; | |||
| uint8_t usb_midi_msg_type; | |||
| @@ -279,4 +279,5 @@ int usb_midi_read(uint32_t channel) | |||
| } | |||
| #endif // F_CPU | |||
| #endif // MIDI_INTERFACE | |||
| @@ -35,6 +35,7 @@ | |||
| #include <string.h> // for memcpy() | |||
| #ifdef MOUSE_INTERFACE // defined by usb_dev.h -> usb_desc.h | |||
| #if F_CPU >= 20000000 | |||
| // which buttons are currently pressed | |||
| uint8_t usb_mouse_buttons_state=0; | |||
| @@ -239,5 +240,5 @@ void usb_mouse_screen_size(uint16_t width, uint16_t height, uint8_t mac) | |||
| } | |||
| #endif // F_CPU | |||
| #endif // MOUSE_INTERFACE | |||
| @@ -35,6 +35,7 @@ | |||
| //#include "HardwareSerial.h" | |||
| #ifdef RAWHID_INTERFACE // defined by usb_dev.h -> usb_desc.h | |||
| #if F_CPU >= 20000000 | |||
| int usb_rawhid_recv(void *buffer, uint32_t timeout) | |||
| { | |||
| @@ -85,4 +86,5 @@ int usb_rawhid_send(const void *buffer, uint32_t timeout) | |||
| return RAWHID_TX_SIZE; | |||
| } | |||
| #endif // F_CPU | |||
| #endif // RAWHID_INTERFACE | |||
| @@ -36,6 +36,7 @@ | |||
| // defined by usb_dev.h -> usb_desc.h | |||
| #if defined(CDC_STATUS_INTERFACE) && defined(CDC_DATA_INTERFACE) | |||
| #if F_CPU >= 20000000 | |||
| uint32_t usb_cdc_line_coding[2]; | |||
| volatile uint8_t usb_cdc_line_rtsdtr=0; | |||
| @@ -290,9 +291,5 @@ void usb_serial_flush_callback(void) | |||
| #endif // F_CPU | |||
| #endif // CDC_STATUS_INTERFACE && CDC_DATA_INTERFACE | |||
| @@ -33,7 +33,7 @@ | |||
| #include "usb_desc.h" | |||
| #if defined(CDC_DATA_INTERFACE) | |||
| #if defined(CDC_STATUS_INTERFACE) && defined(CDC_DATA_INTERFACE) | |||
| #include <inttypes.h> | |||
| @@ -147,6 +147,6 @@ extern void serialEvent(void); | |||
| #endif // F_CPU | |||
| #endif // CDC_DATA_INTERFACE | |||
| #endif // CDC_STATUS_INTERFACE && CDC_DATA_INTERFACE | |||
| #endif // USBserial_h_ | |||