Skip to content

Commit cc53512

Browse files
committed
implement PUSB getShortName
1 parent 26c5450 commit cc53512

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/MIDIUSB.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ int MIDI_::getDescriptor(USBSetup& setup __attribute__((unused)))
6969
return 0;
7070
}
7171

72-
char* MIDI_GetShortName()
72+
uint8_t MIDI_::getShortName(char* name)
7373
{
74-
static char* name = "MIDI";
75-
return name;
74+
memcpy(name, "MIDI", 4);
75+
return 4;
7676
}
7777

7878
void MIDI_::accept(void)

src/MIDIUSB.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ class MIDI_ : public PluggableUSBModule
196196
int getInterface(uint8_t* interfaceNum);
197197
int getDescriptor(USBSetup& setup);
198198
bool setup(USBSetup& setup);
199+
uint8_t getShortName(char* name);
199200

200201
public:
201202
MIDI_(void);

0 commit comments

Comments
 (0)