Old version
Fork of nRF51822 by
Diff: nordic/nrf-sdk/sd_common/softdevice_handler.h
- Revision:
- 65:98215c4f3a25
- Parent:
- 56:a1071b629aa3
diff -r 5d5f5cbc7c79 -r 98215c4f3a25 nordic/nrf-sdk/sd_common/softdevice_handler.h --- a/nordic/nrf-sdk/sd_common/softdevice_handler.h Mon Sep 08 15:45:22 2014 +0000 +++ b/nordic/nrf-sdk/sd_common/softdevice_handler.h Mon Sep 08 17:21:46 2014 +0100 @@ -71,12 +71,21 @@ * reinitialization). */ /*lint -emacro(506, SOFTDEVICE_HANDLER_INIT) */ /* Suppress "Constant value Boolean */ -#define SOFTDEVICE_HANDLER_INIT(CLOCK_SOURCE, USE_SCHEDULER) \ +#define SOFTDEVICE_HANDLER_INIT(CLOCK_SOURCE, \ + USE_SCHEDULER) \ do \ { \ - static uint32_t EVT_BUFFER[CEIL_DIV(MAX(MAX(BLE_STACK_EVT_MSG_BUF_SIZE, ANT_STACK_EVT_STRUCT_SIZE), SYS_EVT_MSG_BUF_SIZE), sizeof(uint32_t))]; \ + static uint32_t EVT_BUFFER[CEIL_DIV(MAX( \ + MAX(BLE_STACK_EVT_MSG_BUF_SIZE, \ + ANT_STACK_EVT_STRUCT_SIZE), \ + SYS_EVT_MSG_BUF_SIZE \ + ), \ + sizeof(uint32_t))]; \ uint32_t ERR_CODE; \ - ERR_CODE = softdevice_handler_init((CLOCK_SOURCE), EVT_BUFFER, sizeof(EVT_BUFFER), (USE_SCHEDULER) ? softdevice_evt_schedule : NULL); \ + ERR_CODE = softdevice_handler_init((CLOCK_SOURCE), \ + EVT_BUFFER, \ + sizeof(EVT_BUFFER), \ + (USE_SCHEDULER) ? softdevice_evt_schedule : NULL); \ APP_ERROR_CHECK(ERR_CODE); \ } while (0)