From e1ca9dc92f1587aee9fbe18e4af0a9c844ab7bcf Mon Sep 17 00:00:00 2001 From: Daniel Kluge Date: Mon, 22 Jan 2024 15:23:02 +0100 Subject: [PATCH] Correct naming Co-authored-by: Oliver Parczyk --- src/main.cpp | 3 --- src/name.c | 13 +++++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 src/name.c diff --git a/src/main.cpp b/src/main.cpp index 3b5642e..ae9b222 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,8 +1,5 @@ #include -#define MIDI_NAME {'P', 'i', 'n', 'g', 'b', 'o', 'a', 'r', 'd'} -#define MIDI_NAME_LEN 9 - #define KEY_GROUP_NUM 9 #define KEY_PINS 6 #define NUMBER_OF_KEYS 49 diff --git a/src/name.c b/src/name.c new file mode 100644 index 0000000..20e8915 --- /dev/null +++ b/src/name.c @@ -0,0 +1,13 @@ +// To give your USB MIDI device 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 {'P', 'i', 'n', 'g', 'b', 'o', 'a', 'r', 'd'} +#define MIDI_NAME_LEN 9 + +// 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 +};