From ff9c6a93fa648d102c395c373d7ec88c906d6fcd Mon Sep 17 00:00:00 2001 From: midilab Date: Mon, 15 May 2023 07:02:47 -0400 Subject: [PATCH] fix missing name.c for usb-midi definitions on teensy arm platforms --- examples/TeensyUsbMasterMidiClock/name.c | 19 +++++++++++++++++++ examples/TeensyUsbSlaveMidiClock/name.c | 19 +++++++++++++++++++ .../TeensyUsbSlaveMidiClockMonitor/name.c | 19 +++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 examples/TeensyUsbMasterMidiClock/name.c create mode 100644 examples/TeensyUsbSlaveMidiClock/name.c create mode 100644 examples/TeensyUsbSlaveMidiClockMonitor/name.c diff --git a/examples/TeensyUsbMasterMidiClock/name.c b/examples/TeensyUsbMasterMidiClock/name.c new file mode 100644 index 0000000..0e26fb3 --- /dev/null +++ b/examples/TeensyUsbMasterMidiClock/name.c @@ -0,0 +1,19 @@ +// To give your project a unique name, this code must be +// placed into a .c file (its own tab). It can not be in +// a .cpp file or your main sketch (the .ino file). + +#include "usb_names.h" + +// Edit these lines to create your own name. The length must +// match the number of characters in your custom name. + +#define MIDI_NAME {'u','c','l','o','c','k','_','1'} +#define MIDI_NAME_LEN 8 + +// Do not change this part. This exact format is required by USB. + +struct usb_string_descriptor_struct usb_string_product_name = { + 2 + MIDI_NAME_LEN * 2, + 3, + MIDI_NAME +}; diff --git a/examples/TeensyUsbSlaveMidiClock/name.c b/examples/TeensyUsbSlaveMidiClock/name.c new file mode 100644 index 0000000..0e26fb3 --- /dev/null +++ b/examples/TeensyUsbSlaveMidiClock/name.c @@ -0,0 +1,19 @@ +// To give your project a unique name, this code must be +// placed into a .c file (its own tab). It can not be in +// a .cpp file or your main sketch (the .ino file). + +#include "usb_names.h" + +// Edit these lines to create your own name. The length must +// match the number of characters in your custom name. + +#define MIDI_NAME {'u','c','l','o','c','k','_','1'} +#define MIDI_NAME_LEN 8 + +// Do not change this part. This exact format is required by USB. + +struct usb_string_descriptor_struct usb_string_product_name = { + 2 + MIDI_NAME_LEN * 2, + 3, + MIDI_NAME +}; diff --git a/examples/TeensyUsbSlaveMidiClockMonitor/name.c b/examples/TeensyUsbSlaveMidiClockMonitor/name.c new file mode 100644 index 0000000..0e26fb3 --- /dev/null +++ b/examples/TeensyUsbSlaveMidiClockMonitor/name.c @@ -0,0 +1,19 @@ +// To give your project a unique name, this code must be +// placed into a .c file (its own tab). It can not be in +// a .cpp file or your main sketch (the .ino file). + +#include "usb_names.h" + +// Edit these lines to create your own name. The length must +// match the number of characters in your custom name. + +#define MIDI_NAME {'u','c','l','o','c','k','_','1'} +#define MIDI_NAME_LEN 8 + +// Do not change this part. This exact format is required by USB. + +struct usb_string_descriptor_struct usb_string_product_name = { + 2 + MIDI_NAME_LEN * 2, + 3, + MIDI_NAME +};