diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2019-10-21 22:35:58 +1100 |
---|---|---|
committer | Jim Mussared <jim.mussared@gmail.com> | 2019-10-22 14:30:23 +1100 |
commit | f34e16dbc6648a46590501bbc5e4b146bd032eef (patch) | |
tree | 07a0b4b502452d40935de573965f9edf38d1db72 /extmod/modbluetooth.h | |
parent | c7ae8c5a99fa463dea23c34e0bd70e71dfc118b9 (diff) |
extmod/modbluetooth: Persist reference to NimBLE service instances.
NimBLE doesn't actually copy this data, it requires it to stay live.
Only dereference when we register a new set of services.
Fixes #5226
This will allow incrementally adding services in the future, so
rename `reset` to `append` to make it clearer.
Diffstat (limited to 'extmod/modbluetooth.h')
-rw-r--r-- | extmod/modbluetooth.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/modbluetooth.h b/extmod/modbluetooth.h index e99641e8f..20476b183 100644 --- a/extmod/modbluetooth.h +++ b/extmod/modbluetooth.h @@ -165,7 +165,7 @@ int mp_bluetooth_gap_advertise_start(bool connectable, int32_t interval_us, cons void mp_bluetooth_gap_advertise_stop(void); // Start adding services. Must be called before mp_bluetooth_register_service. -int mp_bluetooth_gatts_register_service_begin(bool reset); +int mp_bluetooth_gatts_register_service_begin(bool append); // // Add a service with the given list of characteristics to the queue to be registered. // The value_handles won't be valid until after mp_bluetooth_register_service_end is called. int mp_bluetooth_gatts_register_service(mp_obj_bluetooth_uuid_t *service_uuid, mp_obj_bluetooth_uuid_t **characteristic_uuids, uint8_t *characteristic_flags, mp_obj_bluetooth_uuid_t **descriptor_uuids, uint8_t *descriptor_flags, uint8_t *num_descriptors, uint16_t *handles, size_t num_characteristics); |