rename
This commit is contained in:
1 parent
3c0f3e84f1
commit
a3cd4104b2
4 files changed
+8
-8
No files matched your search
@@ -278,7 +278,7 @@ err_t BLECharacteristic::begin(void)
|
||||
if ( !_is_temp &&
|
||||
(_rd_authorize_cb || _wr_authorize_cb || _wr_cb || _cccd_wr_cb) )
|
||||
{
|
||||
(void) Bluefruit.Gatt._registerCharacteristic(this);
|
||||
(void) Bluefruit.Gatt._addCharacteristic(this);
|
||||
}
|
||||
|
||||
return ERROR_NONE;
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
BLEGatt::BLEGatt(void)
|
||||
{
|
||||
_chars_count = 0;
|
||||
for(uint8_t i=0; i<BLE_MAX_CHARS; i++) _chars_list[i] = NULL;
|
||||
for(uint8_t i=0; i<BLE_GATT_MAX_SERVER_CHARS; i++) _chars_list[i] = NULL;
|
||||
|
||||
|
||||
}
|
||||
@@ -53,9 +53,9 @@ void BLEGatt::_eventHandler(ble_evt_t* evt)
|
||||
|
||||
}
|
||||
|
||||
bool BLEGatt::_registerCharacteristic(BLECharacteristic* chars)
|
||||
bool BLEGatt::_addCharacteristic(BLECharacteristic* chars)
|
||||
{
|
||||
if ( _chars_count == BLE_MAX_CHARS ) return false;
|
||||
if ( _chars_count == BLE_GATT_MAX_SERVER_CHARS ) return false;
|
||||
_chars_list[ _chars_count++ ] = chars;
|
||||
|
||||
return true;
|
||||
|
||||
@@ -46,18 +46,18 @@
|
||||
#include "BLECentralCharacteristic.h"
|
||||
#include "BLECentralService.h"
|
||||
|
||||
#define BLE_MAX_CHARS 40
|
||||
#define BLE_GATT_MAX_SERVER_CHARS 40
|
||||
|
||||
class BLEGatt
|
||||
{
|
||||
public:
|
||||
BLEGatt(void);
|
||||
|
||||
bool _registerCharacteristic(BLECharacteristic* chars);
|
||||
bool _addCharacteristic(BLECharacteristic* chars);
|
||||
void _eventHandler(ble_evt_t* evt);
|
||||
|
||||
private:
|
||||
BLECharacteristic* _chars_list[BLE_MAX_CHARS];
|
||||
BLECharacteristic* _chars_list[BLE_GATT_MAX_SERVER_CHARS];
|
||||
uint8_t _chars_count;
|
||||
};
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ class AdafruitBluefruit
|
||||
|
||||
BLEDfu _dfu_svc;
|
||||
|
||||
BLECharacteristic* _chars_list[BLE_MAX_CHARS];
|
||||
BLECharacteristic* _chars_list[BLE_GATT_MAX_SERVER_CHARS];
|
||||
uint8_t _chars_count;
|
||||
|
||||
uint16_t _conn_hdl;
|
||||
|
||||
Reference in new issue
Block a user