From f34e16dbc6648a46590501bbc5e4b146bd032eef Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Mon, 21 Oct 2019 22:35:58 +1100 Subject: 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. --- extmod/modbluetooth.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'extmod/modbluetooth.h') 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); -- cgit v1.2.3