summaryrefslogtreecommitdiff
path: root/ports/nrf/drivers/bluetooth
diff options
context:
space:
mode:
authorarturo182 <arturo182@tlen.pl>2018-07-16 14:44:20 +0200
committerarturo182 <arturo182@tlen.pl>2018-10-21 15:43:08 +0200
commitf4940c9aec2ac73086efe18fbc57151f55c85981 (patch)
tree633bbd5f1c054760b409e6638a9c8c0296ab9a49 /ports/nrf/drivers/bluetooth
parentb436666e852b0d75a970052997ea019af7411b45 (diff)
nrf: Move the UUID class from ubluepy to the shared bleio module
Also added a UUIDType enum-like class for determining UUID type.
Diffstat (limited to 'ports/nrf/drivers/bluetooth')
-rw-r--r--ports/nrf/drivers/bluetooth/ble_drv.c4
-rw-r--r--ports/nrf/drivers/bluetooth/ble_uart.c18
2 files changed, 11 insertions, 11 deletions
diff --git a/ports/nrf/drivers/bluetooth/ble_drv.c b/ports/nrf/drivers/bluetooth/ble_drv.c
index 3f21f8c49..81d2a8ece 100644
--- a/ports/nrf/drivers/bluetooth/ble_drv.c
+++ b/ports/nrf/drivers/bluetooth/ble_drv.c
@@ -430,11 +430,11 @@ bool ble_drv_advertise_data(ubluepy_advertise_data_t * p_adv_params) {
for (uint8_t i = 0; i < p_adv_params->num_of_services; i++) {
ubluepy_service_obj_t * p_service = (ubluepy_service_obj_t *)p_adv_params->p_services[i];
- if (p_service->p_uuid->type == UBLUEPY_UUID_16_BIT) {
+ if (p_service->p_uuid->type == UUID_TYPE_16BIT) {
type_16bit_present = true;
}
- if (p_service->p_uuid->type == UBLUEPY_UUID_128_BIT) {
+ if (p_service->p_uuid->type == UUID_TYPE_128BIT) {
type_128bit_present = true;
}
}
diff --git a/ports/nrf/drivers/bluetooth/ble_uart.c b/ports/nrf/drivers/bluetooth/ble_uart.c
index 52c042f7b..b1d54eefa 100644
--- a/ports/nrf/drivers/bluetooth/ble_uart.c
+++ b/ports/nrf/drivers/bluetooth/ble_uart.c
@@ -34,21 +34,21 @@
#if MICROPY_PY_BLE_NUS
-static ubluepy_uuid_obj_t uuid_obj_service = {
- .base.type = &ubluepy_uuid_type,
- .type = UBLUEPY_UUID_128_BIT,
+static bleio_uuid_obj_t uuid_obj_service = {
+ .base.type = &bleio_uuid_type,
+ .type = UUID_128_BIT,
.value = {0x01, 0x00}
};
-static ubluepy_uuid_obj_t uuid_obj_char_tx = {
- .base.type = &ubluepy_uuid_type,
- .type = UBLUEPY_UUID_128_BIT,
+static bleio_uuid_obj_t uuid_obj_char_tx = {
+ .base.type = &bleio_uuid_type,
+ .type = UUID_128_BIT,
.value = {0x03, 0x00}
};
-static ubluepy_uuid_obj_t uuid_obj_char_rx = {
- .base.type = &ubluepy_uuid_type,
- .type = UBLUEPY_UUID_128_BIT,
+static bleio_uuid_obj_t uuid_obj_char_rx = {
+ .base.type = &bleio_uuid_type,
+ .type = UUID_128_BIT,
.value = {0x02, 0x00}
};