added end() method, stop'ping BLE

This commit is contained in:
lathoub 2021-05-28 21:06:07 +02:00
parent e0fb12b9c0
commit aa0f6bc44a
6 changed files with 31 additions and 1 deletions

View File

@ -46,6 +46,11 @@ public:
void begin()
{
mBleClass.begin(mDeviceName, this);
}
void end()
{
mBleClass.end();
}
bool beginTransmission(MIDI_NAMESPACE::MidiType type)

View File

@ -21,7 +21,12 @@ public:
}
bool begin(const char*, BLEMIDI<class BLEMIDI_Client_ESP32>*);
void end()
{
}
void write(uint8_t* data, uint8_t length)
{
_characteristic->setValue(data, length);

View File

@ -75,6 +75,11 @@ public:
bool begin(const char*, BLEMIDI_Transport<class BLEMIDI_ArduinoBLE>*);
void end()
{
}
void write(uint8_t* buffer, size_t length)
{
// TODO: test length

View File

@ -30,6 +30,11 @@ public:
bool begin(const char*, BLEMIDI_Transport<class BLEMIDI_ESP32>*);
void end()
{
}
void write(uint8_t* buffer, size_t length)
{
_characteristic->setValue(buffer, length);

View File

@ -27,6 +27,11 @@ public:
bool begin(const char*, BLEMIDI_Transport<class BLEMIDI_ESP32_NimBLE>*);
void end()
{
}
void write(uint8_t* buffer, size_t length)
{
_characteristic->setValue(buffer, length);

View File

@ -24,6 +24,11 @@ public:
bool begin(const char*, BLEMIDI_NAMESPACE::BLEMIDI_Transport<class BLEMIDI_nRF52>*);
void end()
{
}
void write(uint8_t* buffer, size_t length)
{
}