Bluenet  5.7.0
Bluenet, firmware for nRF52 smart home devices
Loading...
Searching...
No Matches
cs_BleError.h File Reference
#include <ble/cs_Nordic.h>
#include <logging/cs_CLogger.h>
#include <util/cs_Error.h>
Include dependency graph for cs_BleError.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FDS_ERROR_CHECK(ret_code_t)
 Macro for FDS error handling (will not abort) More...
 
#define APP_ERROR_HANDLER(cs_ret_code_t)
 Macro for calling error handler function. More...
 
#define APP_ERROR_CHECK(cs_ret_code_t)
 Macro for calling error handler function if supplied error code any other than NRF_SUCCESS. More...
 
#define APP_ERROR_CHECK_EXCEPT(cs_ret_code_t, EXCEPTION)
 
#define BLE_CALL(function, args)
 __EXCEPTIONS More...
 
#define BLE_THROW_IF(result, message)
 
#define BLE_THROW(message)
 

Functions

void ble_error_handler (const char *msg, uint32_t line_num, const char *p_file_name)
 Author: Crownstone Team Date: 21 Sep., 2013 License: LGPLv3+, Apache License 2.0, and/or MIT (triple-licensed) More...
 
void assert_nrf_callback (uint16_t line_num, const uint8_t *file_name)
 called by soft device when you pass bad parameters, etc. More...
 
void softdevice_assertion_handler (uint32_t pc, uint16_t line_num, const uint8_t *file_name)
 
void mesh_assertion_handler (uint32_t pc)
 

Macro Definition Documentation

◆ APP_ERROR_CHECK

#define APP_ERROR_CHECK (   cs_ret_code_t)
Value:
do { \
const uint32_t LOCAL_cs_ret_code_t = (cs_ret_code_t); \
if (LOCAL_cs_ret_code_t != NRF_SUCCESS) { \
CLOGe("cs_ret_code_t: $nordicTypeName(%u) (0x%X)", LOCAL_cs_ret_code_t, LOCAL_cs_ret_code_t); \
APP_ERROR_HANDLER(LOCAL_cs_ret_code_t); \
} \
} while (0)
uint16_t cs_ret_code_t
Definition: cs_Typedefs.h:21

Macro for calling error handler function if supplied error code any other than NRF_SUCCESS.

Parameters
[in]cs_ret_code_tError code supplied to the error handler.

◆ APP_ERROR_CHECK_EXCEPT

#define APP_ERROR_CHECK_EXCEPT (   cs_ret_code_t,
  EXCEPTION 
)
Value:
if (cs_ret_code_t == EXCEPTION) { \
CLOGw(STRINGIFY((int)EXCEPTION)); \
} \
else { \
APP_ERROR_CHECK(cs_ret_code_t); \
}

◆ APP_ERROR_HANDLER

#define APP_ERROR_HANDLER (   cs_ret_code_t)
Value:
do { \
app_error_handler((cs_ret_code_t), __LINE__, (uint8_t*)__FILE__); \
} while (0)

Macro for calling error handler function.

Parameters
[in]cs_ret_code_tError code supplied to the error handler.

◆ BLE_CALL

#define BLE_CALL (   function,
  args 
)
Value:
do { \
uint32_t result = function args; \
APP_ERROR_CHECK(result); \
} while (0)

__EXCEPTIONS

◆ BLE_THROW

#define BLE_THROW (   message)
Value:
do { \
CLOGd("BLE_THROW: %s", message); \
ble_error_handler(message, __LINE__, __FILE__); \
} while (0)

◆ BLE_THROW_IF

#define BLE_THROW_IF (   result,
  message 
)
Value:
do { \
if (result != NRF_SUCCESS) { \
CLOGd("BLE_THROW: %s", message); \
ble_error_handler(message, __LINE__, __FILE__); \
} \
} while (0)

◆ FDS_ERROR_CHECK

#define FDS_ERROR_CHECK (   ret_code_t)
Value:
do { \
const uint32_t LOCAL_ret_code_t = (ret_code_t); \
if (LOCAL_ret_code_t != NRF_SUCCESS) { \
CLOGe("ret_code_t: $nordicFDSTypeName(%u) (0x%X)", LOCAL_ret_code_t, LOCAL_ret_code_t); \
} \
} while (0)
uint32_t ret_code_t
Author: Crownstone Team Copyright: Crownstone (https://crownstone.rocks) Date: Apr.
Definition: cs_Nordic.h:14

Macro for FDS error handling (will not abort)

Function Documentation

◆ assert_nrf_callback()

void assert_nrf_callback ( uint16_t  line_num,
const uint8_t *  file_name 
)

called by soft device when you pass bad parameters, etc.

◆ ble_error_handler()

void ble_error_handler ( const char *  msg,
uint32_t  line_num,
const char *  p_file_name 
)

Author: Crownstone Team Date: 21 Sep., 2013 License: LGPLv3+, Apache License 2.0, and/or MIT (triple-licensed)

Called by BluetoothLE.h classes when exceptions are disabled.

◆ mesh_assertion_handler()

void mesh_assertion_handler ( uint32_t  pc)

◆ softdevice_assertion_handler()

void softdevice_assertion_handler ( uint32_t  pc,
uint16_t  line_num,
const uint8_t *  file_name 
)