Skip to content

Commit fffc358

Browse files
authored
Merge pull request #242 from adafruit/some-enhance
Some enhance
2 parents f0acba4 + 6297d3b commit fffc358

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ body:
5252

5353
- type: textarea
5454
attributes:
55-
label: Sketch & Compiled output (as attached txt files)
55+
label: Sketch & compiled Log (as attached txt files)
5656
placeholder: |
5757
e.g examples/MassStorage/msc_ramdisk.
5858
If it is custom sketch, please provide it as **ATTACHED** files or link to it.
59-
Compiled output must be attached as txt files for readability
59+
Compiled log must be attached as txt files for readability
6060
validations:
6161
required: true
6262

src/arduino/midi/Adafruit_USBD_MIDI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ bool Adafruit_USBD_MIDI::setCableName(uint8_t cable_id, const char *str) {
7676
}
7777

7878
uint8_t strid = TinyUSBDevice.addStringDescriptor(str);
79-
_cable_name_strid[cable_id] = strid;
79+
_cable_name_strid[cable_id - 1] = strid;
8080

8181
return strid > 0;
8282
}
@@ -117,7 +117,7 @@ uint16_t Adafruit_USBD_MIDI::makeItfDesc(uint8_t itfnum, uint8_t *buf,
117117

118118
// Jack
119119
for (uint8_t i = 1; i <= _n_cables; i++) {
120-
uint8_t jack[] = {TUD_MIDI_DESC_JACK_DESC(i, _cable_name_strid[i])};
120+
uint8_t jack[] = {TUD_MIDI_DESC_JACK_DESC(i, _cable_name_strid[i - 1])};
121121
memcpy(buf + len, jack, sizeof(jack));
122122
len += sizeof(jack);
123123
}

src/arduino/midi/Adafruit_USBD_MIDI.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class Adafruit_USBD_MIDI : public Stream, public Adafruit_USBD_Interface {
6969

7070
private:
7171
uint8_t _n_cables;
72-
uint8_t _cable_name_strid[8];
72+
uint8_t _cable_name_strid[16];
7373
};
7474

7575
#endif /* ADAFRUIT_USBD_MIDI_H_ */

src/arduino/ports/rp2040/tusb_config_rp2040.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ extern int serial1_printf(const char *__restrict __format, ...);
125125

126126
// Set Line Coding on enumeration/mounted, value for cdc_line_coding_t
127127
// bit rate = 115200, 1 stop bit, no parity, 8 bit data width
128-
// This need https://github.com/sekigon-gonnoc/Pico-PIO-USB/pull/58 to be merged
129-
// first #define CFG_TUH_CDC_LINE_CODING_ON_ENUM { 115200,
130-
// CDC_LINE_CONDING_STOP_BITS_1, CDC_LINE_CODING_PARITY_NONE, 8 }
128+
// This need Pico-PIO-USB at least 0.5.1
129+
#define CFG_TUH_CDC_LINE_CODING_ON_ENUM \
130+
{ 115200, CDC_LINE_CONDING_STOP_BITS_1, CDC_LINE_CODING_PARITY_NONE, 8 }
131131

132132
#ifdef __cplusplus
133133
}

0 commit comments

Comments
 (0)