2121#include " BLEPeripheralHelper.h"
2222#include " internal/ble_client.h"
2323
24- uint8_t profile_notify_process (struct bt_conn *conn,
25- struct bt_gatt_subscribe_params *params,
26- const void *data, uint16_t length);
27- uint8_t profile_read_rsp_process (struct bt_conn *conn, int err,
28- struct bt_gatt_read_params *params,
24+ uint8_t profile_notify_process (bt_conn_t *conn,
25+ bt_gatt_subscribe_params_t *params,
26+ const void *data, uint16_t length);
27+ uint8_t profile_read_rsp_process (bt_conn_t *conn, int err,
28+ bt_gatt_read_params_t *params,
2929 const void *data,
3030 uint16_t length);
3131
3232unsigned char BLECharacteristic::_numNotifyAttributes = 0 ;
3333
34- struct bt_uuid_16 BLECharacteristic::_gatt_chrc_uuid = {BT_UUID_TYPE_16, BT_UUID_GATT_CHRC_VAL};
35- struct bt_uuid_16 BLECharacteristic::_gatt_ccc_uuid = {BT_UUID_TYPE_16, BT_UUID_GATT_CCC_VAL};
34+ bt_uuid_16_t BLECharacteristic::_gatt_chrc_uuid = {BT_UUID_TYPE_16, BT_UUID_GATT_CHRC_VAL};
35+ bt_uuid_16_t BLECharacteristic::_gatt_ccc_uuid = {BT_UUID_TYPE_16, BT_UUID_GATT_CCC_VAL};
3636
3737BLECharacteristic::BLECharacteristic (const char * uuid,
3838 const unsigned char properties,
@@ -246,12 +246,12 @@ BLECharacteristic::numNotifyAttributes(void) {
246246 return _numNotifyAttributes;
247247}
248248
249- struct _bt_gatt_ccc * BLECharacteristic::getCccCfg (void )
249+ _bt_gatt_ccc_t * BLECharacteristic::getCccCfg (void )
250250{
251251 return &_ccc_value;
252252}
253253
254- struct bt_gatt_chrc * BLECharacteristic::getCharacteristicAttValue (void )
254+ bt_gatt_chrc_t * BLECharacteristic::getCharacteristicAttValue (void )
255255{
256256 return &_gatt_chrc;
257257}
@@ -270,32 +270,32 @@ uint8_t BLECharacteristic::getPermission(void)
270270 return perm;
271271}
272272
273- struct bt_uuid * BLECharacteristic::getCharacteristicAttributeUuid (void )
273+ bt_uuid_t * BLECharacteristic::getCharacteristicAttributeUuid (void )
274274{
275- return (struct bt_uuid *) &_gatt_chrc_uuid;
275+ return (bt_uuid_t *) &_gatt_chrc_uuid;
276276}
277- struct bt_uuid * BLECharacteristic::getClientCharacteristicConfigUuid (void )
277+ bt_uuid_t * BLECharacteristic::getClientCharacteristicConfigUuid (void )
278278{
279- return (struct bt_uuid *) &_gatt_ccc_uuid;
279+ return (bt_uuid_t *) &_gatt_ccc_uuid;
280280}
281281
282282
283- void BLECharacteristic::addCharacteristicDeclaration (struct bt_gatt_attr *gatt_attr)
283+ void BLECharacteristic::addCharacteristicDeclaration (bt_gatt_attr_t *gatt_attr)
284284{
285285 _attr_chrc_declaration = gatt_attr;
286286}
287287
288- void BLECharacteristic::addCharacteristicValue (struct bt_gatt_attr *gatt_attr)
288+ void BLECharacteristic::addCharacteristicValue (bt_gatt_attr_t *gatt_attr)
289289{
290290 _attr_chrc_value = gatt_attr;
291291}
292292
293- void BLECharacteristic::addCharacteristicConfigDescriptor (struct bt_gatt_attr *gatt_attr)
293+ void BLECharacteristic::addCharacteristicConfigDescriptor (bt_gatt_attr_t *gatt_attr)
294294{
295295 _attr_cccd = gatt_attr;
296296}
297297
298- void BLECharacteristic::discover (struct bt_gatt_discover_params *params)
298+ void BLECharacteristic::discover (bt_gatt_discover_params_t *params)
299299{
300300 params->type = BT_GATT_DISCOVER_CHARACTERISTIC;
301301 params->uuid = this ->uuid ();
@@ -306,8 +306,8 @@ void BLECharacteristic::discover(struct bt_gatt_discover_params *params)
306306}
307307
308308
309- void BLECharacteristic::discover (const struct bt_gatt_attr *attr,
310- struct bt_gatt_discover_params *params)
309+ void BLECharacteristic::discover (const bt_gatt_attr_t *attr,
310+ bt_gatt_discover_params_t *params)
311311{
312312 if (!attr)
313313 {
@@ -340,15 +340,15 @@ void BLECharacteristic::discover(const struct bt_gatt_attr *attr,
340340 }
341341}
342342
343- struct bt_gatt_subscribe_params *BLECharacteristic::getSubscribeParams ()
343+ bt_gatt_subscribe_params_t *BLECharacteristic::getSubscribeParams ()
344344{
345345 return &_sub_params;
346346}
347347
348348bool BLECharacteristic::read (BLEPeripheralHelper &peripheral)
349349{
350350 int retval = 0 ;
351- struct bt_conn * conn = NULL ;
351+ bt_conn_t * conn = NULL ;
352352 if (_reading)
353353 {
354354 // Already in reading state
@@ -387,7 +387,7 @@ bool BLECharacteristic::write(BLEPeripheralHelper &peripheral,
387387 uint16_t length)
388388{
389389 int retval = 0 ;
390- struct bt_conn * conn = NULL ;
390+ bt_conn_t * conn = NULL ;
391391
392392 conn = bt_conn_lookup_addr_le (peripheral.bt_le_address ());
393393 if (NULL == conn)
0 commit comments