Update BLEMIDI_Transport.h
Added new callback for BLE connection that returns the name of the connected device
This commit is contained in:
parent
929c2fc049
commit
fe1a17dfb7
|
|
@ -185,6 +185,7 @@ protected:
|
||||||
public:
|
public:
|
||||||
// callbacks
|
// callbacks
|
||||||
void (*_connectedCallback)() = nullptr;
|
void (*_connectedCallback)() = nullptr;
|
||||||
|
void (*_connectedCallbackDeviceName)(char *) = nullptr;
|
||||||
void (*_disconnectedCallback)() = nullptr;
|
void (*_disconnectedCallback)() = nullptr;
|
||||||
|
|
||||||
BLEMIDI_Transport &setName(const char *deviceName)
|
BLEMIDI_Transport &setName(const char *deviceName)
|
||||||
|
|
@ -200,6 +201,12 @@ public:
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BLEMIDI_Transport &setHandleConnected(void (*fptr)(char*))
|
||||||
|
{
|
||||||
|
_connectedCallbackDeviceName= fptr;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
BLEMIDI_Transport &setHandleDisconnected(void (*fptr)())
|
BLEMIDI_Transport &setHandleDisconnected(void (*fptr)())
|
||||||
{
|
{
|
||||||
_disconnectedCallback = fptr;
|
_disconnectedCallback = fptr;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue