Pārlūkot izejas kodu

Add support for USB_DISABLED

teensy4-core
PaulStoffregen pirms 10 gadiem
vecāks
revīzija
db476e9130
3 mainītis faili ar 9 papildinājumiem un 3 dzēšanām
  1. +1
    -1
      teensy3/usb_dev.h
  2. +6
    -0
      teensy3/usb_inst.cpp
  3. +2
    -2
      teensy3/usb_serial.h

+ 1
- 1
teensy3/usb_dev.h Parādīt failu

@@ -34,7 +34,7 @@
#define USB_DESC_LIST_DEFINE
#include "usb_desc.h"

#if F_CPU >= 20000000
#if F_CPU >= 20000000 && !defined(USB_DISABLED)

// This header is NOT meant to be included when compiling
// user sketches in Arduino. The low-level functions

+ 6
- 0
teensy3/usb_inst.cpp Parādīt failu

@@ -34,8 +34,10 @@
#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;
@@ -66,6 +68,10 @@ usb_joystick_class Joystick;
uint8_t usb_joystick_class::manual_mode = 0;
#endif

#ifdef USB_DISABLED
usb_serial_class Serial;
#endif


#else // F_CPU < 20 MHz


+ 2
- 2
teensy3/usb_serial.h Parādīt failu

@@ -33,11 +33,11 @@

#include "usb_desc.h"

#if defined(CDC_STATUS_INTERFACE) && defined(CDC_DATA_INTERFACE)
#if (defined(CDC_STATUS_INTERFACE) && defined(CDC_DATA_INTERFACE)) || defined(USB_DISABLED)

#include <inttypes.h>

#if F_CPU >= 20000000
#if F_CPU >= 20000000 && !defined(USB_DISABLED)

// C language implementation
#ifdef __cplusplus

Notiek ielāde…
Atcelt
Saglabāt