@@ -141,7 +141,7 @@ BLE::initImplementation(FunctionPointerWithContext<InitializationCompleteCallbac
141
141
142
142
// this stub is required by ARMCC otherwise link will systematically fail
143
143
MBED_WEAK BLEInstanceBase* createBLEInstance () {
144
- MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_NOT_IMPLEMENTED ), " Please provide an implementation for mbed BLE" );
144
+ MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BACKEND_CREATION_FAILED ), " Please provide an implementation for mbed BLE" );
145
145
return NULL ;
146
146
}
147
147
@@ -191,7 +191,7 @@ void defaultSchedulingCallback(BLE::OnEventsToProcessCallbackContext* params) {
191
191
bool BLE::hasInitialized (void ) const
192
192
{
193
193
if (!transport) {
194
- MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BAD_TRANSPORT_HANDLE ), " bad handle to underlying transport" );
194
+ MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BACKEND_NOT_INITIALIZED ), " bad handle to underlying transport" );
195
195
}
196
196
197
197
return transport->hasInitialized ();
@@ -200,7 +200,7 @@ bool BLE::hasInitialized(void) const
200
200
ble_error_t BLE::shutdown (void )
201
201
{
202
202
if (!transport) {
203
- MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BAD_TRANSPORT_HANDLE ), " bad handle to underlying transport" );
203
+ MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BACKEND_NOT_INITIALIZED ), " bad handle to underlying transport" );
204
204
}
205
205
206
206
event_signaled = false ;
@@ -210,7 +210,7 @@ ble_error_t BLE::shutdown(void)
210
210
const char *BLE::getVersion (void )
211
211
{
212
212
if (!transport) {
213
- MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BAD_TRANSPORT_HANDLE ), " bad handle to underlying transport" );
213
+ MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BACKEND_NOT_INITIALIZED ), " bad handle to underlying transport" );
214
214
}
215
215
216
216
return transport->getVersion ();
@@ -219,7 +219,7 @@ const char *BLE::getVersion(void)
219
219
const Gap &BLE::gap () const
220
220
{
221
221
if (!transport) {
222
- MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BAD_TRANSPORT_HANDLE ), " bad handle to underlying transport" );
222
+ MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BACKEND_NOT_INITIALIZED ), " bad handle to underlying transport" );
223
223
}
224
224
225
225
return transport->getGap ();
@@ -228,7 +228,7 @@ const Gap &BLE::gap() const
228
228
Gap &BLE::gap ()
229
229
{
230
230
if (!transport) {
231
- MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BAD_TRANSPORT_HANDLE ), " bad handle to underlying transport" );
231
+ MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BACKEND_NOT_INITIALIZED ), " bad handle to underlying transport" );
232
232
}
233
233
234
234
return transport->getGap ();
@@ -237,7 +237,7 @@ Gap &BLE::gap()
237
237
const GattServer& BLE::gattServer () const
238
238
{
239
239
if (!transport) {
240
- MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BAD_TRANSPORT_HANDLE ), " bad handle to underlying transport" );
240
+ MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BACKEND_NOT_INITIALIZED ), " bad handle to underlying transport" );
241
241
}
242
242
243
243
return transport->getGattServer ();
@@ -246,7 +246,7 @@ const GattServer& BLE::gattServer() const
246
246
GattServer& BLE::gattServer ()
247
247
{
248
248
if (!transport) {
249
- MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BAD_TRANSPORT_HANDLE ), " bad handle to underlying transport" );
249
+ MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BACKEND_NOT_INITIALIZED ), " bad handle to underlying transport" );
250
250
}
251
251
252
252
return transport->getGattServer ();
@@ -255,7 +255,7 @@ GattServer& BLE::gattServer()
255
255
const GattClient& BLE::gattClient () const
256
256
{
257
257
if (!transport) {
258
- MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BAD_TRANSPORT_HANDLE ), " bad handle to underlying transport" );
258
+ MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BACKEND_NOT_INITIALIZED ), " bad handle to underlying transport" );
259
259
}
260
260
261
261
return transport->getGattClient ();
@@ -264,7 +264,7 @@ const GattClient& BLE::gattClient() const
264
264
GattClient& BLE::gattClient ()
265
265
{
266
266
if (!transport) {
267
- MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BAD_TRANSPORT_HANDLE ), " bad handle to underlying transport" );
267
+ MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BACKEND_NOT_INITIALIZED ), " bad handle to underlying transport" );
268
268
}
269
269
270
270
return transport->getGattClient ();
@@ -273,7 +273,7 @@ GattClient& BLE::gattClient()
273
273
const SecurityManager& BLE::securityManager () const
274
274
{
275
275
if (!transport) {
276
- MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BAD_TRANSPORT_HANDLE ), " bad handle to underlying transport" );
276
+ MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BACKEND_NOT_INITIALIZED ), " bad handle to underlying transport" );
277
277
}
278
278
279
279
return transport->getSecurityManager ();
@@ -282,7 +282,7 @@ const SecurityManager& BLE::securityManager() const
282
282
SecurityManager& BLE::securityManager ()
283
283
{
284
284
if (!transport) {
285
- MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BAD_TRANSPORT_HANDLE ), " bad handle to underlying transport" );
285
+ MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BACKEND_NOT_INITIALIZED ), " bad handle to underlying transport" );
286
286
}
287
287
288
288
return transport->getSecurityManager ();
@@ -291,7 +291,7 @@ SecurityManager& BLE::securityManager()
291
291
void BLE::waitForEvent (void )
292
292
{
293
293
if (!transport) {
294
- MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BAD_TRANSPORT_HANDLE ), " bad handle to underlying transport" );
294
+ MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BACKEND_NOT_INITIALIZED ), " bad handle to underlying transport" );
295
295
}
296
296
297
297
transport->waitForEvent ();
@@ -304,7 +304,7 @@ void BLE::processEvents()
304
304
}
305
305
306
306
if (!transport) {
307
- MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BAD_TRANSPORT_HANDLE ), " bad handle to underlying transport" );
307
+ MBED_ERROR (MBED_MAKE_ERROR (MBED_MODULE_BLE, MBED_ERROR_CODE_BLE_BACKEND_NOT_INITIALIZED ), " bad handle to underlying transport" );
308
308
}
309
309
310
310
event_signaled = false ;
0 commit comments