File tree Expand file tree Collapse file tree 8 files changed +27
-40
lines changed
libraries/ble-api-implementation Expand file tree Collapse file tree 8 files changed +27
-40
lines changed Original file line number Diff line number Diff line change @@ -188,9 +188,10 @@ class BLE {
188
188
* @return A reference to a single object.
189
189
*
190
190
* @pre id shall be less than NUM_INSTANCES.
191
- * @deprecated BLE singleton supports one instance. You may create multiple instances by using the constructor.
192
- * Please use BLE::Instance().
191
+ *
193
192
*/
193
+ MBED_DEPRECATED_SINCE (" mbed-os-6.3.0" , " BLE singleton supports one instance. You may create multiple"
194
+ " instances by using the constructor. Please use BLE::Instance()." )
194
195
static BLE &Instance (InstanceID_t id)
195
196
{
196
197
return Instance ();
@@ -200,8 +201,9 @@ class BLE {
200
201
* Fetch the ID of a BLE instance.
201
202
*
202
203
* @return Instance id of this BLE instance.
203
- * @deprecated BLE singleton supports one instance. You may create multiple instances by using the constructor.
204
204
*/
205
+ MBED_DEPRECATED_SINCE (" mbed-os-6.3.0" , " BLE singleton supports one instance. You may create multiple"
206
+ " instances by using the constructor." )
205
207
InstanceID_t getInstanceID (void ) const
206
208
{
207
209
return DEFAULT_INSTANCE;
Original file line number Diff line number Diff line change @@ -555,7 +555,7 @@ class Gap {
555
555
/* *
556
556
* Preferred connection parameter display in Generic Access Service.
557
557
*/
558
- typedef struct PreferredConnectionParams_t {
558
+ typedef struct {
559
559
/* *
560
560
* Minimum interval between two connection events allowed for a
561
561
* connection.
Original file line number Diff line number Diff line change 33
33
34
34
#include " ble/BLE.h"
35
35
36
- /* ! Maximum count of characteristics that can be stored for authorisation purposes */
37
- #define MAX_CHARACTERISTIC_AUTHORIZATION_CNT 20
38
-
39
- /* ! client characteristic configuration descriptors settings */
40
- #define MAX_CCCD_CNT 20
41
-
42
36
namespace ble {
43
- class PalAttClient ;
44
- class BLE ;
45
37
46
38
/* *
47
39
* @addtogroup ble
Original file line number Diff line number Diff line change @@ -921,15 +921,9 @@ class SecurityManager
921
921
922
922
public:
923
923
#if !defined(DOXYGEN_ONLY)
924
- /* * For backwards compatibility. This enm is now in BLETypes.h
925
- * @deprecated, use the enum in ble namespace */
926
- enum Keypress_t {
927
- KEYPRESS_STARTED, /* *< Passkey entry started */
928
- KEYPRESS_ENTERED, /* *< Passkey digit entered */
929
- KEYPRESS_ERASED, /* *< Passkey digit erased */
930
- KEYPRESS_CLEARED, /* *< Passkey cleared */
931
- KEYPRESS_COMPLETED, /* *< Passkey entry completed */
932
- };
924
+ /* * For backwards compatibility. This enum is now in BLETypes.h
925
+ * @deprecated use the enum in ble namespace */
926
+ typedef ble::Keypress_t Keypress_t;
933
927
#endif // !defined(DOXYGEN_ONLY)
934
928
};
935
929
Original file line number Diff line number Diff line change 27
27
28
28
namespace ble {
29
29
30
- class SecurityManager ;
31
- class Gap ;
32
- class GattClient ;
33
- class GattServer ;
34
-
35
30
/* *
36
31
* @addtogroup ble
37
32
* @{
Original file line number Diff line number Diff line change 37
37
#include " ble/types/GattCallbackParamTypes.h"
38
38
#include " ble/internal/PalSigningMonitor.h"
39
39
40
- /* ! Maximum count of characteristics that can be stored for authorisation purposes */
41
- #define MAX_CHARACTERISTIC_AUTHORIZATION_CNT 20
42
-
43
- /* ! client characteristic configuration descriptors settings */
44
- #define MAX_CCCD_CNT 20
45
-
46
40
namespace ble {
47
41
48
42
// fwd declaration of PalAttClient and BLE
@@ -346,12 +340,12 @@ class GattServer :
346
340
347
341
PalSigningMonitorEventHandler *_signing_event_handler;
348
342
349
- attsCccSet_t cccds[MAX_CCCD_CNT ];
350
- uint16_t cccd_values[MAX_CCCD_CNT ];
351
- uint16_t cccd_handles[MAX_CCCD_CNT ];
343
+ attsCccSet_t cccds[MBED_CONF_BLE_API_IMPLEMENTATION_MAX_CCCD_COUNT ];
344
+ uint16_t cccd_values[MBED_CONF_BLE_API_IMPLEMENTATION_MAX_CCCD_COUNT ];
345
+ uint16_t cccd_handles[MBED_CONF_BLE_API_IMPLEMENTATION_MAX_CCCD_COUNT ];
352
346
uint8_t cccd_cnt;
353
347
354
- GattCharacteristic *_auth_char[MAX_CHARACTERISTIC_AUTHORIZATION_CNT ];
348
+ GattCharacteristic *_auth_char[MBED_CONF_BLE_API_IMPLEMENTATION_MAX_CHARACTERISTIC_AUTHORISATION_COUNT ];
355
349
uint8_t _auth_char_count;
356
350
357
351
struct {
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " ble-api-implementation"
2
+ "name" : " ble-api-implementation" ,
3
+ "config" : {
4
+ "max-characteristic-authorisation-count" : {
5
+ "help" : " Maximum count of characteristics that can be stored for authorisation purposes." ,
6
+ "value" : 20
7
+ },
8
+ "max-cccd-count" : {
9
+ "help" : " Client characteristic configuration descriptors settings." ,
10
+ "value" : 20
11
+ }
12
+ }
3
13
}
Original file line number Diff line number Diff line change @@ -406,7 +406,7 @@ ble_error_t GattServer::insert_characteristic_value_attribute(
406
406
characteristic->isReadAuthorizationEnabled () ||
407
407
characteristic->isWriteAuthorizationEnabled ()
408
408
) {
409
- if ( _auth_char_count >= MAX_CHARACTERISTIC_AUTHORIZATION_CNT ) {
409
+ if ( _auth_char_count >= MBED_CONF_BLE_API_IMPLEMENTATION_MAX_CHARACTERISTIC_AUTHORISATION_COUNT ) {
410
410
return BLE_ERROR_NO_MEM;
411
411
}
412
412
_auth_char[_auth_char_count] = characteristic;
@@ -446,7 +446,7 @@ ble_error_t GattServer::insert_descriptor(
446
446
447
447
// handle the special case of a CCCD
448
448
if (descriptor->getUUID () == UUID (BLE_UUID_DESCRIPTOR_CLIENT_CHAR_CONFIG)) {
449
- if (cccd_cnt >= MAX_CCCD_CNT ) {
449
+ if (cccd_cnt >= MBED_CONF_BLE_API_IMPLEMENTATION_MAX_CCCD_COUNT ) {
450
450
return BLE_ERROR_NO_MEM;
451
451
}
452
452
@@ -552,7 +552,7 @@ ble_error_t GattServer::insert_cccd(
552
552
GattCharacteristic *characteristic,
553
553
attsAttr_t *&attribute_it
554
554
) {
555
- if (cccd_cnt >= MAX_CCCD_CNT ) {
555
+ if (cccd_cnt >= MBED_CONF_BLE_API_IMPLEMENTATION_MAX_CCCD_COUNT ) {
556
556
return BLE_ERROR_NO_MEM;
557
557
}
558
558
You can’t perform that action at this time.
0 commit comments