[Breaking] Refactor NimBLEUUID.

* msbFirst parameter has been removed from constructor as it was unnecessary,
caller should reverse the data first or call the new `reverseByteOrder` method after.
* `getNative` method replaced with `getBase` which returns a read-only pointer to the UUID size underlying.
* Added `reverseByteOrder` method, this will reverse the bytes of the UUID, which can be useful for advertising/logging.
* Added `getValue` method, which returns a read-only `uint8_t` pointer to the UUID value.
* Removed `m_valueSet` member variable, `bitSize()` can be used as a replacement.
* General code cleanup.
This commit is contained in:
h2zero
2024-07-12 20:42:53 -06:00
committed by h2zero
parent d1d1b49a26
commit 10d589162b
15 changed files with 237 additions and 310 deletions

View File

@@ -814,7 +814,7 @@ bool NimBLEClient::retrieveServices(const NimBLEUUID *uuid_filter) {
if(uuid_filter == nullptr) {
rc = ble_gattc_disc_all_svcs(m_conn_id, NimBLEClient::serviceDiscoveredCB, &taskData);
} else {
rc = ble_gattc_disc_svc_by_uuid(m_conn_id, &uuid_filter->getNative()->u,
rc = ble_gattc_disc_svc_by_uuid(m_conn_id, uuid_filter->getBase(),
NimBLEClient::serviceDiscoveredCB, &taskData);
}