add getMTU() to Gap

This commit is contained in:
hathach committed 2017-07-26 15:39:06 +07:00
1 parent 5b6ee693ac
commit 2b3be764e2
2 files changed
+7

No files matched your search

+5
View File
@@ -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);