summaryrefslogtreecommitdiff
path: root/devices
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2020-07-28 14:28:09 -0400
committerDan Halbert <halbert@halwitz.org>2020-07-28 14:28:09 -0400
commit0619966c19bb9aeba7ec4fc19562878ca77e15ab (patch)
treed173fb4c3f9c8316a3fc5c1e92b5f895bef5689c /devices
parent9572f306d3a4cbbbb662961890147b7793e740a9 (diff)
wip
Diffstat (limited to 'devices')
-rw-r--r--devices/ble_hci/common-hal/_bleio/Service.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/devices/ble_hci/common-hal/_bleio/Service.c b/devices/ble_hci/common-hal/_bleio/Service.c
index 07a9b4de2..938f68711 100644
--- a/devices/ble_hci/common-hal/_bleio/Service.c
+++ b/devices/ble_hci/common-hal/_bleio/Service.c
@@ -44,6 +44,7 @@ uint32_t _common_hal_bleio_service_construct(bleio_service_obj_t *self, bleio_uu
uint32_t status;
self->handle = bleio_adapter_add_attribute(
+ common_hal_bleio_adapter_obj,
is_secondary ? BLE_TYPE_SECONDARY_SERVICE : BLE_TYPE_PRIMARY_SERVICE,
uuid, &status);
return status;
@@ -82,9 +83,10 @@ bool common_hal_bleio_service_get_is_secondary(bleio_service_obj_t *self) {
void common_hal_bleio_service_add_characteristic(bleio_service_obj_t *self,
bleio_characteristic_obj_t *characteristic,
mp_buffer_info_t *initial_value_bufinfo) {
- common_hal_bleio_adapter_obj
+
//FIX how it's done by ArduinoBLE when a service is added.
- // uint16_t startHandle = attributeCount();
+ // uint16_t startHandle = attributeCount();
+ uint16_t start_handle bleio_adapter_num_attributes(common_hal_bleio_adapter_obj);
// for (unsigned int i = 0; i < service->characteristicCount(); i++) {
// BLELocalCharacteristic* characteristic = service->characteristic(i);