File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -180,23 +180,26 @@ class BLEMIDI_Transport
180
180
void (*_connectedCallback)() = nullptr ;
181
181
void (*_disconnectedCallback)() = nullptr ;
182
182
183
- void setName (const char *deviceName)
184
- {
183
+ BLEMIDI_Transport & setName (const char *deviceName)
184
+ {
185
185
strncpy (mDeviceName , deviceName, sizeof (mDeviceName ));
186
+ return *this ;
186
187
};
187
188
188
189
public:
189
- void setHandleConnected (void (*fptr)())
190
+ BLEMIDI_Transport & setHandleConnected (void (*fptr)())
190
191
{
191
192
_connectedCallback = fptr;
193
+ return *this ;
192
194
}
193
195
194
- void setHandleDisconnected (void (*fptr)())
196
+ BLEMIDI_Transport & setHandleDisconnected (void (*fptr)())
195
197
{
196
198
_disconnectedCallback = fptr;
199
+ return *this ;
197
200
}
198
201
199
- /*
202
+ /*
200
203
The general form of a MIDI message follows:
201
204
n-byte MIDI Message
202
205
Byte 0 MIDI message Status byte, Bit 7 is Set to 1.
@@ -227,12 +230,12 @@ class BLEMIDI_Transport
227
230
from other messages – except for System Exclusive messages.
228
231
*/
229
232
230
- /* *
233
+ /* *
231
234
* If #define RUNNING_ENABLE is commented/disabled, it will transform all incoming runningStatus messages in full midi messages.
232
235
* Else, it will put in the buffer the same info that it had received (runningStatus will be not transformated).
233
236
* It recommend not use runningStatus by default. Only use if parser accepts runningStatus and your application has a so high transmission rate.
234
237
*/
235
- #define RUNNING_ENABLE
238
+ #define RUNNING_ENABLE
236
239
237
240
void receive (byte *buffer, size_t length)
238
241
{
You can’t perform that action at this time.
0 commit comments