Browse Source

Opps, fix compile for slow speeds

teensy4-core
PaulStoffregen 10 years ago
parent
commit
caa5312fbc
9 changed files with 16 additions and 16 deletions
  1. +0
    -4
      teensy3/usb_desc.h
  2. +2
    -0
      teensy3/usb_flightsim.cpp
  3. +2
    -2
      teensy3/usb_joystick.c
  4. +2
    -1
      teensy3/usb_keyboard.c
  5. +2
    -1
      teensy3/usb_midi.c
  6. +2
    -1
      teensy3/usb_mouse.c
  7. +2
    -0
      teensy3/usb_rawhid.c
  8. +2
    -5
      teensy3/usb_serial.c
  9. +2
    -2
      teensy3/usb_serial.h

+ 0
- 4
teensy3/usb_desc.h View File

#ifndef _usb_desc_h_ #ifndef _usb_desc_h_
#define _usb_desc_h_ #define _usb_desc_h_


#if F_CPU >= 20000000

// This header is NOT meant to be included when compiling // This header is NOT meant to be included when compiling
// user sketches in Arduino. The low-level functions // user sketches in Arduino. The low-level functions
// provided by usb_dev.c are meant to be called only by // provided by usb_dev.c are meant to be called only by
#endif // NUM_ENDPOINTS #endif // NUM_ENDPOINTS
#endif // USB_DESC_LIST_DEFINE #endif // USB_DESC_LIST_DEFINE


#endif // F_CPU >= 20 MHz

#endif #endif

+ 2
- 0
teensy3/usb_flightsim.cpp View File

#include <string.h> // for memcpy() #include <string.h> // for memcpy()


#ifdef FLIGHTSIM_INTERFACE // defined by usb_dev.h -> usb_desc.h #ifdef FLIGHTSIM_INTERFACE // defined by usb_dev.h -> usb_desc.h
#if F_CPU >= 20000000


FlightSimCommand * FlightSimCommand::first = NULL; FlightSimCommand * FlightSimCommand::first = NULL;
FlightSimCommand * FlightSimCommand::last = NULL; FlightSimCommand * FlightSimCommand::last = NULL;
} }
} }


#endif // F_CPU
#endif // FLIGHTSIM_INTERFACE #endif // FLIGHTSIM_INTERFACE

+ 2
- 2
teensy3/usb_joystick.c View File

#include <string.h> // for memcpy() #include <string.h> // for memcpy()


#ifdef JOYSTICK_INTERFACE // defined by usb_dev.h -> usb_desc.h #ifdef JOYSTICK_INTERFACE // defined by usb_dev.h -> usb_desc.h
#if F_CPU >= 20000000


uint32_t usb_joystick_data[3]; uint32_t usb_joystick_data[3];








#endif // F_CPU
#endif // JOYSTICK_INTERFACE #endif // JOYSTICK_INTERFACE

+ 2
- 1
teensy3/usb_keyboard.c View File

#include <string.h> // for memcpy() #include <string.h> // for memcpy()


#ifdef KEYBOARD_INTERFACE // defined by usb_dev.h -> usb_desc.h #ifdef KEYBOARD_INTERFACE // defined by usb_dev.h -> usb_desc.h
#if F_CPU >= 20000000


// which modifier keys are currently pressed // which modifier keys are currently pressed
// 1=left ctrl, 2=left shift, 4=left alt, 8=left gui // 1=left ctrl, 2=left shift, 4=left alt, 8=left gui
} }




#endif // F_CPU
#endif // KEYBOARD_INTERFACE #endif // KEYBOARD_INTERFACE

+ 2
- 1
teensy3/usb_midi.c View File

#include "HardwareSerial.h" #include "HardwareSerial.h"


#ifdef MIDI_INTERFACE // defined by usb_dev.h -> usb_desc.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_channel;
uint8_t usb_midi_msg_type; uint8_t usb_midi_msg_type;
} }




#endif // F_CPU
#endif // MIDI_INTERFACE #endif // MIDI_INTERFACE

+ 2
- 1
teensy3/usb_mouse.c View File

#include <string.h> // for memcpy() #include <string.h> // for memcpy()


#ifdef MOUSE_INTERFACE // defined by usb_dev.h -> usb_desc.h #ifdef MOUSE_INTERFACE // defined by usb_dev.h -> usb_desc.h
#if F_CPU >= 20000000


// which buttons are currently pressed // which buttons are currently pressed
uint8_t usb_mouse_buttons_state=0; uint8_t usb_mouse_buttons_state=0;
} }




#endif // F_CPU
#endif // MOUSE_INTERFACE #endif // MOUSE_INTERFACE

+ 2
- 0
teensy3/usb_rawhid.c View File

//#include "HardwareSerial.h" //#include "HardwareSerial.h"


#ifdef RAWHID_INTERFACE // defined by usb_dev.h -> usb_desc.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) int usb_rawhid_recv(void *buffer, uint32_t timeout)
{ {
return RAWHID_TX_SIZE; return RAWHID_TX_SIZE;
} }


#endif // F_CPU
#endif // RAWHID_INTERFACE #endif // RAWHID_INTERFACE

+ 2
- 5
teensy3/usb_serial.c View File



// defined by usb_dev.h -> usb_desc.h // defined by usb_dev.h -> usb_desc.h
#if defined(CDC_STATUS_INTERFACE) && defined(CDC_DATA_INTERFACE) #if defined(CDC_STATUS_INTERFACE) && defined(CDC_DATA_INTERFACE)
#if F_CPU >= 20000000


uint32_t usb_cdc_line_coding[2]; uint32_t usb_cdc_line_coding[2];
volatile uint8_t usb_cdc_line_rtsdtr=0; volatile uint8_t usb_cdc_line_rtsdtr=0;











#endif // F_CPU
#endif // CDC_STATUS_INTERFACE && CDC_DATA_INTERFACE #endif // CDC_STATUS_INTERFACE && CDC_DATA_INTERFACE

+ 2
- 2
teensy3/usb_serial.h View File



#include "usb_desc.h" #include "usb_desc.h"


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


#include <inttypes.h> #include <inttypes.h>




#endif // F_CPU #endif // F_CPU


#endif // CDC_DATA_INTERFACE
#endif // CDC_STATUS_INTERFACE && CDC_DATA_INTERFACE


#endif // USBserial_h_ #endif // USBserial_h_

Loading…
Cancel
Save