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