1 /***************************************************************************//**
2 * @file
3 * @brief Assert API
4 * @author Energy Micro AS
5 * @version 3.0.0
6 *******************************************************************************
7 * @section License
8 * <b>(C) Copyright 2012 Energy Micro AS, http://www.energymicro.com</b>
9 *******************************************************************************
10 *
11 * Permission is granted to anyone to use this software for any purpose,
12 * including commercial applications, and to alter it and redistribute it
13 * freely, subject to the following restrictions:
14 *
15 * 1. The origin of this software must not be misrepresented; you must not
16 * claim that you wrote the original software.
17 * 2. Altered source versions must be plainly marked as such, and must not be
18 * misrepresented as being the original software.
19 * 3. This notice may not be removed or altered from any source distribution.
20 *
21 * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Energy Micro AS has no
22 * obligation to support this Software. Energy Micro AS is providing the
23 * Software "AS IS", with no express or implied warranties of any kind,
24 * including, but not limited to, any implied warranties of merchantability
25 * or fitness for any particular purpose or warranties against infringement
26 * of any proprietary rights of a third party.
27 *
28 * Energy Micro AS will not be liable for any consequential, incidental, or
29 * special damages, or any other relief, or for any claim by any third party,
30 * arising from your use of this Software.
31 *
32 ******************************************************************************/
33 #include "em_assert.h"
34
35 #if defined(DEBUG_EFM)
36
37 /***************************************************************************//**
38 * @brief
39 * EFM internal assert handling.
40 *
41 * This function is invoked through EFM_ASSERT() macro usage only, it should
42 * not be used explicitly.
43 *
44 * Currently this implementation only enters an indefinite loop, allowing
45 * the use of a debugger to determine cause of failure. By defining
46 * DEBUG_EFM_USER to the preprocessor for all files, a user defined version
47 * of this function must be defined and will be invoked instead, possibly
48 * providing output of assertion location.
49 *
50 * Please notice that this function is not used unless DEBUG_EFM is defined
51 * during preprocessing of EFM_ASSERT() usage.
52 *
53 * @par file
54 * Name of source file where assertion failed.
55 *
56 * @par line
57 * Line number in source file where assertion failed.
58 ******************************************************************************/
assertEFM(const char * file,int line)59 void assertEFM(const char *file, int line)
60 {
61 (void)file; /* Unused parameter */
62 (void)line; /* Unused parameter */
63
64 while (1)
65 ;
66 }
67
68 #endif /* DEBUG_EFM */
69