mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 11:10:14 +01:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user