project for nrf51822 qfab

Dependencies:   eddystone_URL mbed

Fork of eddystone_URL by vo dung

Committer:
tridung141196
Date:
Thu Nov 23 15:38:48 2017 +0000
Revision:
5:267bdacf5508
Parent:
0:76dfa9657d9d
ibeacon

Who changed what in which revision?

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