テスト用です。

Dependencies:   mbed

Committer:
jksoft
Date:
Tue Oct 11 11:09:42 2016 +0000
Revision:
0:8468a4403fea
SB??ver;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jksoft 0:8468a4403fea 1 /*
jksoft 0:8468a4403fea 2 * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved.
jksoft 0:8468a4403fea 3 *
jksoft 0:8468a4403fea 4 * The information contained herein is confidential property of Nordic Semiconductor. The use,
jksoft 0:8468a4403fea 5 * copying, transfer or disclosure of such information is prohibited except by express written
jksoft 0:8468a4403fea 6 * agreement with Nordic Semiconductor.
jksoft 0:8468a4403fea 7 *
jksoft 0:8468a4403fea 8 */
jksoft 0:8468a4403fea 9
jksoft 0:8468a4403fea 10 /** @brief Utilities for verifying program logic
jksoft 0:8468a4403fea 11 */
jksoft 0:8468a4403fea 12
jksoft 0:8468a4403fea 13 #ifndef SOFTDEVICE_ASSERT_H_
jksoft 0:8468a4403fea 14 #define SOFTDEVICE_ASSERT_H_
jksoft 0:8468a4403fea 15
jksoft 0:8468a4403fea 16 #include <stdint.h>
jksoft 0:8468a4403fea 17
jksoft 0:8468a4403fea 18 /** @brief This function handles assertions.
jksoft 0:8468a4403fea 19 *
jksoft 0:8468a4403fea 20 *
jksoft 0:8468a4403fea 21 * @note
jksoft 0:8468a4403fea 22 * This function is called when an assertion has triggered.
jksoft 0:8468a4403fea 23 *
jksoft 0:8468a4403fea 24 *
jksoft 0:8468a4403fea 25 * @param line_num The line number where the assertion is called
jksoft 0:8468a4403fea 26 * @param file_name Pointer to the file name
jksoft 0:8468a4403fea 27 */
jksoft 0:8468a4403fea 28 void assert_softdevice_callback(uint16_t line_num, const uint8_t *file_name);
jksoft 0:8468a4403fea 29
jksoft 0:8468a4403fea 30
jksoft 0:8468a4403fea 31 /*lint -emacro(506, ASSERT) */ /* Suppress "Constant value Boolean */
jksoft 0:8468a4403fea 32 /*lint -emacro(774, ASSERT) */ /* Suppress "Boolean within 'if' always evaluates to True" */ \
jksoft 0:8468a4403fea 33 /** @brief Check intended for production code
jksoft 0:8468a4403fea 34 *
jksoft 0:8468a4403fea 35 * Check passes if "expr" evaluates to true. */
jksoft 0:8468a4403fea 36 #define ASSERT(expr) \
jksoft 0:8468a4403fea 37 if (expr) \
jksoft 0:8468a4403fea 38 { \
jksoft 0:8468a4403fea 39 } \
jksoft 0:8468a4403fea 40 else \
jksoft 0:8468a4403fea 41 { \
jksoft 0:8468a4403fea 42 assert_softdevice_callback((uint16_t)__LINE__, (uint8_t *)__FILE__); \
jksoft 0:8468a4403fea 43 /*lint -unreachable */ \
jksoft 0:8468a4403fea 44 }
jksoft 0:8468a4403fea 45
jksoft 0:8468a4403fea 46 #endif /* SOFTDEVICE_ASSERT_H_ */