summaryrefslogtreecommitdiff
path: root/src/Components
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-06-27 16:20:08 +0200
committerGitea <gitea@fake.local>2020-06-27 16:20:08 +0200
commit49bf12390bb27ca22a3cc5f472027344befc455e (patch)
tree0a943e544cdb60565af9a5d6bfe6e372299068cb /src/Components
parent3a49bbbae48a62d5252fee0cb6d04002d917c820 (diff)
parent4f9adb2372a71bab3c38684420cf90b1a99a6c9a (diff)
Merge branch 'develop' of JF/PineTime into master
Diffstat (limited to 'src/Components')
-rw-r--r--src/Components/Ble/AlertNotificationService.cpp8
-rw-r--r--src/Components/Ble/CurrentTimeService.cpp8
-rw-r--r--src/Components/Ble/DeviceInformationService.cpp8
-rw-r--r--src/Components/Ble/DfuService.cpp8
4 files changed, 24 insertions, 8 deletions
diff --git a/src/Components/Ble/AlertNotificationService.cpp b/src/Components/Ble/AlertNotificationService.cpp
index 8e3b712d..fd69bda3 100644
--- a/src/Components/Ble/AlertNotificationService.cpp
+++ b/src/Components/Ble/AlertNotificationService.cpp
@@ -17,8 +17,12 @@ int AlertNotificationCallback(uint16_t conn_handle, uint16_t attr_handle, struct
}
void AlertNotificationService::Init() {
- ble_gatts_count_cfg(serviceDefinition);
- ble_gatts_add_svcs(serviceDefinition);
+ int res;
+ res = ble_gatts_count_cfg(serviceDefinition);
+ ASSERT(res == 0);
+
+ res = ble_gatts_add_svcs(serviceDefinition);
+ ASSERT(res == 0);
}
AlertNotificationService::AlertNotificationService ( Pinetime::System::SystemTask& systemTask, Pinetime::Controllers::NotificationManager& notificationManager ) : m_systemTask{systemTask}, m_notificationManager{notificationManager},
diff --git a/src/Components/Ble/CurrentTimeService.cpp b/src/Components/Ble/CurrentTimeService.cpp
index 9ae4c3b8..80ad9c25 100644
--- a/src/Components/Ble/CurrentTimeService.cpp
+++ b/src/Components/Ble/CurrentTimeService.cpp
@@ -13,8 +13,12 @@ int CTSCallback(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_acce
}
void CurrentTimeService::Init() {
- ble_gatts_count_cfg(serviceDefinition);
- ble_gatts_add_svcs(serviceDefinition);
+ int res;
+ res = ble_gatts_count_cfg(serviceDefinition);
+ ASSERT(res == 0);
+
+ res = ble_gatts_add_svcs(serviceDefinition);
+ ASSERT(res == 0);
}
diff --git a/src/Components/Ble/DeviceInformationService.cpp b/src/Components/Ble/DeviceInformationService.cpp
index 3099b1bf..c1d55541 100644
--- a/src/Components/Ble/DeviceInformationService.cpp
+++ b/src/Components/Ble/DeviceInformationService.cpp
@@ -15,8 +15,12 @@ int DeviceInformationCallback(uint16_t conn_handle, uint16_t attr_handle, struct
}
void DeviceInformationService::Init() {
- ble_gatts_count_cfg(serviceDefinition);
- ble_gatts_add_svcs(serviceDefinition);
+ int res = 0;
+ res = ble_gatts_count_cfg(serviceDefinition);
+ ASSERT(res == 0);
+
+ res = ble_gatts_add_svcs(serviceDefinition);
+ ASSERT(res == 0);
}
diff --git a/src/Components/Ble/DfuService.cpp b/src/Components/Ble/DfuService.cpp
index ff899e6f..c6d8493f 100644
--- a/src/Components/Ble/DfuService.cpp
+++ b/src/Components/Ble/DfuService.cpp
@@ -74,8 +74,12 @@ DfuService::DfuService(Pinetime::System::SystemTask &systemTask, Pinetime::Contr
}
void DfuService::Init() {
- ble_gatts_count_cfg(serviceDefinition);
- ble_gatts_add_svcs(serviceDefinition);
+ int res;
+ res = ble_gatts_count_cfg(serviceDefinition);
+ ASSERT(res == 0);
+
+ res = ble_gatts_add_svcs(serviceDefinition);
+ ASSERT(res == 0);
}
int DfuService::OnServiceData(uint16_t connectionHandle, uint16_t attributeHandle, ble_gatt_access_ctxt *context) {