|
28 | 28 | #include <Arduino.h>
|
29 | 29 | #include <BLEMIDI_Transport.h>
|
30 | 30 |
|
31 |
| - struct CustomBufferSizeSettings : public BLEMIDI_NAMESPACE::DefaultSettings { |
32 |
| - static const size_t MaxBufferSize = 16; |
33 |
| -}; |
34 |
| - |
35 | 31 | #include <hardware/BLEMIDI_Client_ESP32.h>
|
36 |
| - |
37 | 32 | //#include <hardware/BLEMIDI_ESP32_NimBLE.h>
|
38 | 33 | //#include <hardware/BLEMIDI_ESP32.h>
|
39 | 34 | //#include <hardware/BLEMIDI_ArduinoBLE.h>
|
40 | 35 |
|
41 |
| -BLEMIDI_CREATE_CUSTOM_INSTANCE("Esp32-BLE-MIDI", MIDI, CustomBufferSizeSettings); // Connect to first server found |
| 36 | +//See DefaultSettingsClient in hardware/BLEMIDI_Client_ESP32.h for more configurable settings |
| 37 | +// If you do not redefine a parameter, it will use the default value for these parameter |
| 38 | +struct CustomBufferSizeSettings : public BLEMIDI_NAMESPACE::DefaultSettingsClient { |
| 39 | + static const size_t MaxBufferSize = 16; |
| 40 | +}; |
| 41 | + |
| 42 | +BLEMIDI_CREATE_CUSTOM_INSTANCE("Esp32-BLE-MIDI", MIDI, CustomBufferSizeSettings); // Connect to a server named "Esp32-BLE-MIDI" and use CustomBufferSizeSettings as settings of client |
42 | 43 |
|
43 |
| -//BLEMIDI_CREATE_INSTANCE("",MIDI) //Connect to the first server found |
44 |
| -//BLEMIDI_CREATE_INSTANCE("f2:c1:d9:36:e7:6b",MIDI) //Connect to a specific BLE address server |
45 |
| -//BLEMIDI_CREATE_INSTANCE("MyBLEserver",MIDI) //Connect to a specific name server |
| 44 | +//BLEMIDI_CREATE_INSTANCE("",MIDI) //Connect to the first server found, using default settings |
| 45 | +//BLEMIDI_CREATE_INSTANCE("f2:c1:d9:36:e7:6b",MIDI) //Connect to a specific BLE address server, using default settings |
| 46 | +//BLEMIDI_CREATE_INSTANCE("MyBLEserver",MIDI) //Connect to a specific name server, using default settings |
46 | 47 |
|
47 | 48 | #ifndef LED_BUILTIN
|
48 | 49 | #define LED_BUILTIN 2 //modify for match with yout board
|
|
0 commit comments