This commit is contained in:
hathach committed 2017-03-30 19:57:59 +07:00
1 parent 852e100007
commit e38908b9da
2 files changed
+8 -7

No files matched your search

+2 -2
View File
@@ -91,7 +91,7 @@ bool BLEGatt::_addCharacteristic(BLECharacteristic* chr)
bool BLEGatt::_addCharacteristic(BLECentralCharacteristic* chr)
{
VERIFY( client._chars_count < BLE_CENTRAL_MAX_CHARS );
VERIFY( client._chars_count < BLE_GATT_MAX_CLIENT_CHARS );
client._chars_list[ client._chars_count++ ] = chr;
return true;
@@ -99,7 +99,7 @@ bool BLEGatt::_addCharacteristic(BLECentralCharacteristic* chr)
bool BLEGatt::_addService(BLECentralService* svc)
{
VERIFY( client._svc_count < BLE_CENTRAL_MAX_SERVICE );
VERIFY( client._svc_count < BLE_GATT_MAX_CLIENT_SERVICE );
client._svc_list[ client._svc_count++ ] = svc;
return true;
+6 -5
View File
@@ -46,9 +46,10 @@
#include "BLECentralCharacteristic.h"
#include "BLECentralService.h"
#define BLE_GATT_MAX_SERVER_CHARS 40
#define BLE_CENTRAL_MAX_SERVICE 10
#define BLE_CENTRAL_MAX_CHARS 30
#define BLE_GATT_MAX_SERVER_CHARS 40
#define BLE_GATT_MAX_CLIENT_SERVICE 10
#define BLE_GATT_MAX_CLIENT_CHARS 30
class BLEGatt
@@ -78,10 +79,10 @@ class BLEGatt
struct {
uint8_t _svc_count;
BLECentralService* _svc_list[BLE_CENTRAL_MAX_SERVICE];
BLECentralService* _svc_list[BLE_GATT_MAX_CLIENT_SERVICE];
uint8_t _chars_count;
BLECentralCharacteristic* _chars_list[BLE_CENTRAL_MAX_CHARS];
BLECentralCharacteristic* _chars_list[BLE_GATT_MAX_CLIENT_CHARS];
}client;
};