mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s110_nrf51822_7_0_0/s110_nrf51822_7.0.0_API/include/softdevice_assert.h@323:9e901b0a5aa1, 2014-09-13 (annotated)
- Committer:
- shaoziyang
- Date:
- Sat Sep 13 14:25:46 2014 +0000
- Revision:
- 323:9e901b0a5aa1
- Parent:
- 277:0dffe5d9e928
test with CLOCK_SETUP = 0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 277:0dffe5d9e928 | 1 | /* |
mbed_official | 277:0dffe5d9e928 | 2 | * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. |
mbed_official | 277:0dffe5d9e928 | 3 | * |
mbed_official | 277:0dffe5d9e928 | 4 | * The information contained herein is confidential property of Nordic Semiconductor. The use, |
mbed_official | 277:0dffe5d9e928 | 5 | * copying, transfer or disclosure of such information is prohibited except by express written |
mbed_official | 277:0dffe5d9e928 | 6 | * agreement with Nordic Semiconductor. |
mbed_official | 277:0dffe5d9e928 | 7 | * |
mbed_official | 277:0dffe5d9e928 | 8 | */ |
mbed_official | 277:0dffe5d9e928 | 9 | |
mbed_official | 277:0dffe5d9e928 | 10 | /** @brief Utilities for verifying program logic |
mbed_official | 277:0dffe5d9e928 | 11 | */ |
mbed_official | 277:0dffe5d9e928 | 12 | |
mbed_official | 277:0dffe5d9e928 | 13 | #ifndef SOFTDEVICE_ASSERT_H_ |
mbed_official | 277:0dffe5d9e928 | 14 | #define SOFTDEVICE_ASSERT_H_ |
mbed_official | 277:0dffe5d9e928 | 15 | |
mbed_official | 277:0dffe5d9e928 | 16 | #include <stdint.h> |
mbed_official | 277:0dffe5d9e928 | 17 | |
mbed_official | 277:0dffe5d9e928 | 18 | /** @brief This function handles assertions. |
mbed_official | 277:0dffe5d9e928 | 19 | * |
mbed_official | 277:0dffe5d9e928 | 20 | * |
mbed_official | 277:0dffe5d9e928 | 21 | * @note |
mbed_official | 277:0dffe5d9e928 | 22 | * This function is called when an assertion has triggered. |
mbed_official | 277:0dffe5d9e928 | 23 | * |
mbed_official | 277:0dffe5d9e928 | 24 | * |
mbed_official | 277:0dffe5d9e928 | 25 | * @param line_num The line number where the assertion is called |
mbed_official | 277:0dffe5d9e928 | 26 | * @param file_name Pointer to the file name |
mbed_official | 277:0dffe5d9e928 | 27 | */ |
mbed_official | 277:0dffe5d9e928 | 28 | void assert_softdevice_callback(uint16_t line_num, const uint8_t *file_name); |
mbed_official | 277:0dffe5d9e928 | 29 | |
mbed_official | 277:0dffe5d9e928 | 30 | |
mbed_official | 277:0dffe5d9e928 | 31 | /*lint -emacro(506, ASSERT) */ /* Suppress "Constant value Boolean */ |
mbed_official | 277:0dffe5d9e928 | 32 | /*lint -emacro(774, ASSERT) */ /* Suppress "Boolean within 'if' always evaluates to True" */ \ |
mbed_official | 277:0dffe5d9e928 | 33 | /** @brief Check intended for production code |
mbed_official | 277:0dffe5d9e928 | 34 | * |
mbed_official | 277:0dffe5d9e928 | 35 | * Check passes if "expr" evaluates to true. */ |
mbed_official | 277:0dffe5d9e928 | 36 | #define ASSERT(expr) \ |
mbed_official | 277:0dffe5d9e928 | 37 | if (expr) \ |
mbed_official | 277:0dffe5d9e928 | 38 | { \ |
mbed_official | 277:0dffe5d9e928 | 39 | } \ |
mbed_official | 277:0dffe5d9e928 | 40 | else \ |
mbed_official | 277:0dffe5d9e928 | 41 | { \ |
mbed_official | 277:0dffe5d9e928 | 42 | assert_softdevice_callback((uint16_t)__LINE__, (uint8_t *)__FILE__); \ |
mbed_official | 277:0dffe5d9e928 | 43 | /*lint -unreachable */ \ |
mbed_official | 277:0dffe5d9e928 | 44 | } |
mbed_official | 277:0dffe5d9e928 | 45 | |
mbed_official | 277:0dffe5d9e928 | 46 | #endif /* SOFTDEVICE_ASSERT_H_ */ |