Преглед на файлове

Merge pull request #223 from Lucky1313/master

Add define guards to allow compiler flags to change product name/serial number
teensy4-core
Paul Stoffregen преди 6 години
родител
ревизия
80170910e6
No account linked to committer's email address
променени са 6 файла, в които са добавени 31 реда и са изтрити 0 реда
  1. +4
    -0
      usb_disk/usb_private.h
  2. +3
    -0
      usb_hid/usb_private.h
  3. +3
    -0
      usb_midi/usb_private.h
  4. +6
    -0
      usb_rawhid/usb_private.h
  5. +6
    -0
      usb_serial/usb_private.h
  6. +9
    -0
      usb_serial_hid/usb_private.h

+ 4
- 0
usb_disk/usb_private.h Целия файл

@@ -15,8 +15,12 @@ extern "C"{

#define VENDOR_ID 0x16C0
#define PRODUCT_ID 0x0484
#ifndef STR_PRODUCT
#define STR_PRODUCT L"Teensy Disk/Keyboard"
#endif
#ifndef STR_SERIAL_NUMBER
#define STR_SERIAL_NUMBER L"123456789ABCDEF0"
#endif

// Some operating systems, especially Windows, may cache USB device
// info. Changes to the device name may not update on the same

+ 3
- 0
usb_hid/usb_private.h Целия файл

@@ -38,7 +38,10 @@ extern "C"{
// computer unless the vendor or product ID numbers change, or the
// "bcdDevice" revision code is increased.

#ifndef STR_PRODUCT
#define STR_PRODUCT L"Teensy Keyboard/Mouse/Joystick"
#endif

#define ENDPOINT0_SIZE 64

#define DEBUG_INTERFACE 2

+ 3
- 0
usb_midi/usb_private.h Целия файл

@@ -44,7 +44,10 @@ extern "C"{
// computer unless the vendor or product ID numbers change, or the
// "bcdDevice" revision code is increased.

#ifndef STR_PRODUCT
#define STR_PRODUCT L"Teensy MIDI"
#endif

#define ENDPOINT0_SIZE 64

#define DEBUG_INTERFACE 1

+ 6
- 0
usb_rawhid/usb_private.h Целия файл

@@ -34,9 +34,15 @@ extern "C"{
*
**************************************************************************/

#ifndef STR_PRODUCT
#define STR_PRODUCT L"Teensyduino RawHID Device"
#endif
#ifndef STR_RAWHID
#define STR_RAWHID L"Teensyduino RawHID"
#endif
#ifndef STR_DEBUG
#define STR_DEBUG L"Emulated Arduino Serial"
#endif
#define ENDPOINT0_SIZE 64

// Some operating systems, especially Windows, may cache USB device

+ 6
- 0
usb_serial/usb_private.h Целия файл

@@ -15,8 +15,12 @@ extern "C"{

// You can change these to give your code its own name. On Windows,
// these are only used before an INF file (driver install) is loaded.
#ifndef STR_MANUFACTURER
#define STR_MANUFACTURER L"Teensyduino"
#endif
#ifndef STR_PRODUCT
#define STR_PRODUCT L"USB Serial"
#endif

// Some operating systems, especially Windows, may cache USB device
// info. Changes to the device name may not update on the same
@@ -39,7 +43,9 @@ extern "C"{
// Udev rules (in /etc/udev/rules.d) can define persistent device
// names linked to this serial number, as well as permissions, owner
// and group settings.
#ifndef STR_SERIAL_NUMBER
#define STR_SERIAL_NUMBER L"12345"
#endif

// Mac OS-X and Linux automatically load the correct drivers. On
// Windows, even though the driver is supplied by Microsoft, an

+ 9
- 0
usb_serial_hid/usb_private.h Целия файл

@@ -15,9 +15,16 @@ extern "C"{

// You can change these to give your code its own name. On Windows,
// these are only used before an INF file (driver install) is loaded.
#ifndef STR_MANUFACTURER
#define STR_MANUFACTURER L"Teensyduino"
#endif
#ifndef STR_PRODUCT
#define STR_PRODUCT L"Serial+Keyboard+Mouse+Joystick"
#endif
#ifndef STR_SERIAL
#define STR_SERIAL L"Serial"
#endif

// Some operating systems, especially Windows, may cache USB device
// info. Changes to the device name may not update on the same
@@ -40,7 +47,9 @@ extern "C"{
// Udev rules (in /etc/udev/rules.d) can define persistent device
// names linked to this serial number, as well as permissions, owner
// and group settings.
#ifndef STR_SERIAL_NUMBER
#define STR_SERIAL_NUMBER L"12345"
#endif

// Mac OS-X and Linux automatically load the correct drivers. On
// Windows, even though the driver is supplied by Microsoft, an

Loading…
Отказ
Запис