add getMTU() to Gap
This commit is contained in:
1 parent
5b6ee693ac
commit
2b3be764e2
2 files changed
+7
No files matched your search
@@ -112,6 +112,11 @@ bool BLEGap::getTxPacket(uint16_t conn_handle)
|
||||
return xSemaphoreTake(_peers[conn_handle].txpacket_sem, ms2tick(BLE_GENERIC_TIMEOUT));
|
||||
}
|
||||
|
||||
uint16_t BLEGap::getMTU (uint16_t conn_handle)
|
||||
{
|
||||
return GATT_MTU_SIZE_DEFAULT - 3;
|
||||
}
|
||||
|
||||
uint16_t BLEGap::getPeerName(uint16_t conn_handle, char* buf, uint16_t bufsize)
|
||||
{
|
||||
return Bluefruit.Gatt.readCharByUuid(conn_handle, BLEUuid(BLE_UUID_GAP_CHARACTERISTIC_DEVICE_NAME), buf, bufsize);
|
||||
|
||||
@@ -61,6 +61,8 @@ class BLEGap
|
||||
uint16_t getPeerName(uint16_t conn_handle, char* buf, uint16_t bufsize);
|
||||
bool getTxPacket(uint16_t conn_handle);
|
||||
|
||||
uint16_t getMTU(uint16_t conn_handle);
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/* INTERNAL USAGE ONLY
|
||||
* Although declare as public, it is meant to be invoked by internal
|
||||
|
||||
Reference in new issue
Block a user