Openwear requires RC oscillator to be used
Fork of nRF51822 by
nordic/nrf-sdk/s110/softdevice_assert.h@0:eff01767de02, 2014-03-26 (annotated)
- Committer:
- bogdanm
- Date:
- Wed Mar 26 14:38:17 2014 +0000
- Revision:
- 0:eff01767de02
- Child:
- 37:c29c330d942c
Initial import of the nRF51822 code
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 0:eff01767de02 | 1 | /* |
bogdanm | 0:eff01767de02 | 2 | * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. |
bogdanm | 0:eff01767de02 | 3 | * |
bogdanm | 0:eff01767de02 | 4 | * The information contained herein is confidential property of Nordic Semiconductor. The use, |
bogdanm | 0:eff01767de02 | 5 | * copying, transfer or disclosure of such information is prohibited except by express written |
bogdanm | 0:eff01767de02 | 6 | * agreement with Nordic Semiconductor. |
bogdanm | 0:eff01767de02 | 7 | * |
bogdanm | 0:eff01767de02 | 8 | */ |
bogdanm | 0:eff01767de02 | 9 | |
bogdanm | 0:eff01767de02 | 10 | /** @brief Utilities for verifying program logic |
bogdanm | 0:eff01767de02 | 11 | */ |
bogdanm | 0:eff01767de02 | 12 | |
bogdanm | 0:eff01767de02 | 13 | #ifndef SOFTDEVICE_ASSERT_H_ |
bogdanm | 0:eff01767de02 | 14 | #define SOFTDEVICE_ASSERT_H_ |
bogdanm | 0:eff01767de02 | 15 | |
bogdanm | 0:eff01767de02 | 16 | #include <stdint.h> |
bogdanm | 0:eff01767de02 | 17 | #include "nordic_global.h" |
bogdanm | 0:eff01767de02 | 18 | |
bogdanm | 0:eff01767de02 | 19 | /** @brief This function handles assertions. |
bogdanm | 0:eff01767de02 | 20 | * |
bogdanm | 0:eff01767de02 | 21 | * |
bogdanm | 0:eff01767de02 | 22 | * @note |
bogdanm | 0:eff01767de02 | 23 | * This function is called when an assertion has triggered. |
bogdanm | 0:eff01767de02 | 24 | * |
bogdanm | 0:eff01767de02 | 25 | * |
bogdanm | 0:eff01767de02 | 26 | * @param line_num The line number where the assertion is called |
bogdanm | 0:eff01767de02 | 27 | * @param file_name Pointer to the file name |
bogdanm | 0:eff01767de02 | 28 | */ |
bogdanm | 0:eff01767de02 | 29 | void assert_softdevice_callback(uint16_t line_num, const uint8_t *file_name); |
bogdanm | 0:eff01767de02 | 30 | |
bogdanm | 0:eff01767de02 | 31 | |
bogdanm | 0:eff01767de02 | 32 | /*lint -emacro(506, ASSERT) */ /* Suppress "Constant value Boolean */ |
bogdanm | 0:eff01767de02 | 33 | /*lint -emacro(774, ASSERT) */ /* Suppress "Boolean within 'if' always evaluates to True" */ \ |
bogdanm | 0:eff01767de02 | 34 | /** @brief Check intended for production code |
bogdanm | 0:eff01767de02 | 35 | * |
bogdanm | 0:eff01767de02 | 36 | * Check passes if "expr" evaluates to true. */ |
bogdanm | 0:eff01767de02 | 37 | #define ASSERT(expr) \ |
bogdanm | 0:eff01767de02 | 38 | if (expr) \ |
bogdanm | 0:eff01767de02 | 39 | { \ |
bogdanm | 0:eff01767de02 | 40 | } \ |
bogdanm | 0:eff01767de02 | 41 | else \ |
bogdanm | 0:eff01767de02 | 42 | { \ |
bogdanm | 0:eff01767de02 | 43 | assert_softdevice_callback((uint16_t)__LINE__, (uint8_t *)__FILE__); \ |
bogdanm | 0:eff01767de02 | 44 | /*lint -unreachable */ \ |
bogdanm | 0:eff01767de02 | 45 | } |
bogdanm | 0:eff01767de02 | 46 | |
bogdanm | 0:eff01767de02 | 47 | #endif /* SOFTDEVICE_ASSERT_H_ */ |