Added all configurations options to example

Added all configurations options
This commit is contained in:
RobertoHE 2022-11-29 09:05:26 +01:00 committed by GitHub
parent 06a1b8f926
commit 25a78fa7f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 49 additions and 0 deletions

View File

@ -1,7 +1,56 @@
#include <BLEMIDI_Transport.h>
static uint32_t customPasskeyRequest()
{
// FILL WITH YOUR CUSTOM AUTH METHOD CODE or PASSKEY
// FOR EXAMPLE:
uint32_t passkey = 123456;
// Serial.println("Client Passkey Request");
/** return the passkey to send to the server */
return passkey;
};
struct CustomBufferSizeSettings : public BLEMIDI_NAMESPACE::DefaultSettings {
//See all options and them explanation in the library.
/*
##### BLE DEVICE NAME #####
*/
//static constexpr char *name = "BleMidiClient";
/*
###### TX POWER #####
*/
//static const esp_power_level_t clientTXPwr = ESP_PWR_LVL_P9;
/*
###### SECURITY #####
*/
//static const uint8_t clientSecurityCapabilities = BLE_HS_IO_NO_INPUT_OUTPUT;
//static const bool clientBond = true;
//static const bool clientMITM = false;
//static const bool clientPair = true;
//static constexpr PasskeyRequestCallback userOnPassKeyRequest = customPasskeyRequest;
/*
###### BLE COMMUNICATION PARAMS ######
*/
//static const uint16_t commMinInterval = 6; // 7.5ms
//static const uint16_t commMaxInterval = 35; // 40ms
//static const uint16_t commLatency = 0; //
//static const uint16_t commTimeOut = 200; // 2000ms
/*
###### BLE FORCE NEW CONNECTION ######
*/
//static const bool forceNewConnection = false;
/*
###### BLE SUBSCRIPTION: NOTIFICATION & RESPONSE ######
*/
//static const bool notification = true;
//static const bool response = true;
/*
###### AND THE OTHER SETTINGS OF MIDI LIBRARY ######
static const size_t MaxBufferSize = 16;
};
#include <hardware/BLEMIDI_ESP32_NimBLE.h>