-
-
- #include <Arduino.h>
- #include "usb_desc.h"
-
- #if F_CPU >= 20000000
-
- #ifdef CDC_DATA_INTERFACE
- #ifdef CDC_STATUS_INTERFACE
- usb_serial_class Serial;
- #endif
- #endif
-
- #ifdef MIDI_INTERFACE
- usb_midi_class usbMIDI;
- #endif
-
- #ifdef KEYBOARD_INTERFACE
- usb_keyboard_class Keyboard;
- #endif
-
- #ifdef MOUSE_INTERFACE
- usb_mouse_class Mouse;
- #endif
-
- #ifdef RAWHID_INTERFACE
- usb_rawhid_class RawHID;
- #endif
-
- #ifdef FLIGHTSIM_INTERFACE
- FlightSimClass FlightSim;
- #endif
-
- #ifdef SEREMU_INTERFACE
- usb_seremu_class Serial;
- #endif
-
- #ifdef JOYSTICK_INTERFACE
- usb_joystick_class Joystick;
- uint8_t usb_joystick_class::manual_mode = 0;
- #endif
-
- #ifdef USB_DISABLED
- usb_serial_class Serial;
- #endif
-
-
- #else
-
- #if defined(USB_SERIAL) || defined(USB_SERIAL_HID)
- usb_serial_class Serial;
- #elif (USB_DISABLED)
- usb_serial_class Serial;
- #else
- usb_seremu_class Serial;
- #endif
-
- #endif
- uint8_t usb_enable_serial_event_processing = 1;
- void serialEvent() __attribute__((weak));
- void serialEvent() {usb_enable_serial_event_processing = 0;}
|