mbed(SerialHalfDuplex入り)
Fork of mbed by
TARGET_NRF51822/TARGET_NORDIC/TARGET_NRF51822/Lib/s110_nrf51822_6_0_0/s110_nrf51822_6.0.0_API/include/softdevice_assert.h@82:6473597d706e, 2014-04-07 (annotated)
- Committer:
- bogdanm
- Date:
- Mon Apr 07 18:28:36 2014 +0100
- Revision:
- 82:6473597d706e
Release 82 of the mbed library
Main changes:
- support for K64F
- Revisited Nordic code structure
- Test infrastructure improvements
- various bug fixes
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 82:6473597d706e | 1 | /* |
bogdanm | 82:6473597d706e | 2 | * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. |
bogdanm | 82:6473597d706e | 3 | * |
bogdanm | 82:6473597d706e | 4 | * The information contained herein is confidential property of Nordic Semiconductor. The use, |
bogdanm | 82:6473597d706e | 5 | * copying, transfer or disclosure of such information is prohibited except by express written |
bogdanm | 82:6473597d706e | 6 | * agreement with Nordic Semiconductor. |
bogdanm | 82:6473597d706e | 7 | * |
bogdanm | 82:6473597d706e | 8 | */ |
bogdanm | 82:6473597d706e | 9 | |
bogdanm | 82:6473597d706e | 10 | /** @brief Utilities for verifying program logic |
bogdanm | 82:6473597d706e | 11 | */ |
bogdanm | 82:6473597d706e | 12 | |
bogdanm | 82:6473597d706e | 13 | #ifndef SOFTDEVICE_ASSERT_H_ |
bogdanm | 82:6473597d706e | 14 | #define SOFTDEVICE_ASSERT_H_ |
bogdanm | 82:6473597d706e | 15 | |
bogdanm | 82:6473597d706e | 16 | #include <stdint.h> |
bogdanm | 82:6473597d706e | 17 | |
bogdanm | 82:6473597d706e | 18 | /** @brief This function handles assertions. |
bogdanm | 82:6473597d706e | 19 | * |
bogdanm | 82:6473597d706e | 20 | * |
bogdanm | 82:6473597d706e | 21 | * @note |
bogdanm | 82:6473597d706e | 22 | * This function is called when an assertion has triggered. |
bogdanm | 82:6473597d706e | 23 | * |
bogdanm | 82:6473597d706e | 24 | * |
bogdanm | 82:6473597d706e | 25 | * @param line_num The line number where the assertion is called |
bogdanm | 82:6473597d706e | 26 | * @param file_name Pointer to the file name |
bogdanm | 82:6473597d706e | 27 | */ |
bogdanm | 82:6473597d706e | 28 | void assert_softdevice_callback(uint16_t line_num, const uint8_t *file_name); |
bogdanm | 82:6473597d706e | 29 | |
bogdanm | 82:6473597d706e | 30 | |
bogdanm | 82:6473597d706e | 31 | /*lint -emacro(506, ASSERT) */ /* Suppress "Constant value Boolean */ |
bogdanm | 82:6473597d706e | 32 | /*lint -emacro(774, ASSERT) */ /* Suppress "Boolean within 'if' always evaluates to True" */ \ |
bogdanm | 82:6473597d706e | 33 | /** @brief Check intended for production code |
bogdanm | 82:6473597d706e | 34 | * |
bogdanm | 82:6473597d706e | 35 | * Check passes if "expr" evaluates to true. */ |
bogdanm | 82:6473597d706e | 36 | #define ASSERT(expr) \ |
bogdanm | 82:6473597d706e | 37 | if (expr) \ |
bogdanm | 82:6473597d706e | 38 | { \ |
bogdanm | 82:6473597d706e | 39 | } \ |
bogdanm | 82:6473597d706e | 40 | else \ |
bogdanm | 82:6473597d706e | 41 | { \ |
bogdanm | 82:6473597d706e | 42 | assert_softdevice_callback((uint16_t)__LINE__, (uint8_t *)__FILE__); \ |
bogdanm | 82:6473597d706e | 43 | /*lint -unreachable */ \ |
bogdanm | 82:6473597d706e | 44 | } |
bogdanm | 82:6473597d706e | 45 | |
bogdanm | 82:6473597d706e | 46 | #endif /* SOFTDEVICE_ASSERT_H_ */ |