The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_EFM32LG_STK3600/TARGET_Silicon_Labs/TARGET_EFM32/emlib/inc/em_assert.h@139:856d2700e60b, 2017-03-30 (annotated)
- Committer:
- <>
- Date:
- Thu Mar 30 13:26:47 2017 +0100
- Revision:
- 139:856d2700e60b
- Parent:
- 128:9bcdf88f62b0
Release 139 of the mbed library
Ports for Upcoming Targets
3934: [Silicon Labs] Update to HAL and devices https://github.com/ARMmbed/mbed-os/pull/3934
Known Issues
There is an issue with LPC1768 failing the 'Semihost file system' test with this release.
Fixes and Changes
3691: [TLS / hw acceleration] AES ECB for NUCLEO_F439ZI https://github.com/ARMmbed/mbed-os/pull/3691
3869: NCS36510: Default range changed from 0 to 950mV - ADC https://github.com/ARMmbed/mbed-os/pull/3869
3893: [STM32F7] Update STM32 Cube version v1.6.0 https://github.com/ARMmbed/mbed-os/pull/3893
3917: Fix mistake register setting in serial_format() https://github.com/ARMmbed/mbed-os/pull/3917
3927: [DELTA_DFBM_NQ620] Add RC calibration setting and revise mbed_overrides.c https://github.com/ARMmbed/mbed-os/pull/3927
3918: [NUC472/M453] Support unique locally administered MAC address and other driver updates https://github.com/ARMmbed/mbed-os/pull/3918
3920: Heap size adjusted to work for both tls-client and mbed-client https://github.com/ARMmbed/mbed-os/pull/3920
3969: NUCLEO_F302R8: Add missing PB_8/PB_9 CAN pins https://github.com/ARMmbed/mbed-os/pull/3969
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Kojto | 98:8ab26030e058 | 1 | /***************************************************************************//** |
Kojto | 98:8ab26030e058 | 2 | * @file em_assert.h |
Kojto | 113:f141b2784e32 | 3 | * @brief Emlib peripheral API "assert" implementation. |
<> | 139:856d2700e60b | 4 | * @version 5.1.2 |
Kojto | 98:8ab26030e058 | 5 | ******************************************************************************* |
Kojto | 98:8ab26030e058 | 6 | * @section License |
<> | 128:9bcdf88f62b0 | 7 | * <b>Copyright 2016 Silicon Laboratories, Inc. http://www.silabs.com</b> |
Kojto | 98:8ab26030e058 | 8 | ******************************************************************************* |
Kojto | 98:8ab26030e058 | 9 | * |
Kojto | 98:8ab26030e058 | 10 | * Permission is granted to anyone to use this software for any purpose, |
Kojto | 98:8ab26030e058 | 11 | * including commercial applications, and to alter it and redistribute it |
Kojto | 98:8ab26030e058 | 12 | * freely, subject to the following restrictions: |
Kojto | 98:8ab26030e058 | 13 | * |
Kojto | 98:8ab26030e058 | 14 | * 1. The origin of this software must not be misrepresented; you must not |
Kojto | 98:8ab26030e058 | 15 | * claim that you wrote the original software. |
Kojto | 98:8ab26030e058 | 16 | * 2. Altered source versions must be plainly marked as such, and must not be |
Kojto | 98:8ab26030e058 | 17 | * misrepresented as being the original software. |
Kojto | 98:8ab26030e058 | 18 | * 3. This notice may not be removed or altered from any source distribution. |
Kojto | 98:8ab26030e058 | 19 | * |
Kojto | 98:8ab26030e058 | 20 | * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no |
Kojto | 98:8ab26030e058 | 21 | * obligation to support this Software. Silicon Labs is providing the |
Kojto | 98:8ab26030e058 | 22 | * Software "AS IS", with no express or implied warranties of any kind, |
Kojto | 98:8ab26030e058 | 23 | * including, but not limited to, any implied warranties of merchantability |
Kojto | 98:8ab26030e058 | 24 | * or fitness for any particular purpose or warranties against infringement |
Kojto | 98:8ab26030e058 | 25 | * of any proprietary rights of a third party. |
Kojto | 98:8ab26030e058 | 26 | * |
Kojto | 98:8ab26030e058 | 27 | * Silicon Labs will not be liable for any consequential, incidental, or |
Kojto | 98:8ab26030e058 | 28 | * special damages, or any other relief, or for any claim by any third party, |
Kojto | 98:8ab26030e058 | 29 | * arising from your use of this Software. |
Kojto | 98:8ab26030e058 | 30 | * |
Kojto | 98:8ab26030e058 | 31 | ******************************************************************************/ |
Kojto | 98:8ab26030e058 | 32 | |
<> | 128:9bcdf88f62b0 | 33 | #ifndef EM_ASSERT_H |
<> | 128:9bcdf88f62b0 | 34 | #define EM_ASSERT_H |
Kojto | 98:8ab26030e058 | 35 | |
Kojto | 98:8ab26030e058 | 36 | #ifdef __cplusplus |
Kojto | 98:8ab26030e058 | 37 | extern "C" { |
Kojto | 98:8ab26030e058 | 38 | #endif |
Kojto | 98:8ab26030e058 | 39 | |
<> | 128:9bcdf88f62b0 | 40 | /***************************************************************************//** |
<> | 128:9bcdf88f62b0 | 41 | * @addtogroup emlib |
<> | 128:9bcdf88f62b0 | 42 | * @{ |
<> | 128:9bcdf88f62b0 | 43 | ******************************************************************************/ |
<> | 128:9bcdf88f62b0 | 44 | |
<> | 128:9bcdf88f62b0 | 45 | #if defined(DOXY_DOC_ONLY) |
<> | 128:9bcdf88f62b0 | 46 | /** @brief Included for documentation purposes only. This define is not present by default. |
<> | 128:9bcdf88f62b0 | 47 | * @ref DEBUG_EFM should be defined from the compiler to enable the default internal |
<> | 128:9bcdf88f62b0 | 48 | * assert handler. */ |
<> | 128:9bcdf88f62b0 | 49 | #define DEBUG_EFM |
<> | 128:9bcdf88f62b0 | 50 | /** @endcond */ |
<> | 128:9bcdf88f62b0 | 51 | #endif |
Kojto | 98:8ab26030e058 | 52 | |
Kojto | 98:8ab26030e058 | 53 | #if defined(DEBUG_EFM) || defined(DEBUG_EFM_USER) |
<> | 128:9bcdf88f62b0 | 54 | /***************************************************************************//** |
<> | 128:9bcdf88f62b0 | 55 | * @addtogroup ASSERT |
<> | 128:9bcdf88f62b0 | 56 | * @brief Error checking module. |
<> | 128:9bcdf88f62b0 | 57 | * @details |
<> | 128:9bcdf88f62b0 | 58 | * By default, EMLIB library assert usage is not included in order to reduce |
<> | 128:9bcdf88f62b0 | 59 | * footprint and processing overhead. Further, EMLIB assert usage is decoupled |
<> | 128:9bcdf88f62b0 | 60 | * from ISO C assert handling (NDEBUG usage), to allow a user to use ISO C |
<> | 128:9bcdf88f62b0 | 61 | * assert without including EMLIB assert statements. |
<> | 128:9bcdf88f62b0 | 62 | * |
<> | 128:9bcdf88f62b0 | 63 | * Below are available defines for controlling EMLIB assert inclusion. The defines |
<> | 128:9bcdf88f62b0 | 64 | * are typically defined for a project to be used by the preprocessor. |
<> | 128:9bcdf88f62b0 | 65 | * |
<> | 128:9bcdf88f62b0 | 66 | * @li If @ref DEBUG_EFM is defined, the internal EMLIB library assert handling will |
<> | 128:9bcdf88f62b0 | 67 | * be used. This is implemented as a simple while(true) loop. @ref DEBUG_EFM is not |
<> | 128:9bcdf88f62b0 | 68 | * defined by default. |
<> | 128:9bcdf88f62b0 | 69 | * |
<> | 128:9bcdf88f62b0 | 70 | * @li If DEBUG_EFM_USER is defined instead, the user must provide their own |
<> | 128:9bcdf88f62b0 | 71 | * implementation of the assertEFM() function. |
<> | 128:9bcdf88f62b0 | 72 | * |
<> | 128:9bcdf88f62b0 | 73 | * @li If both @ref DEBUG_EFM and DEBUG_EFM_USER are undefined then all EFM_ASSERT() |
<> | 128:9bcdf88f62b0 | 74 | * statements are no operation. |
<> | 128:9bcdf88f62b0 | 75 | * |
<> | 128:9bcdf88f62b0 | 76 | * @note |
<> | 128:9bcdf88f62b0 | 77 | * The internal EMLIB assert is documented here because @ref DEBUG_EFM is defined in |
<> | 128:9bcdf88f62b0 | 78 | * the doxygen configuration. |
<> | 128:9bcdf88f62b0 | 79 | * @{ |
<> | 128:9bcdf88f62b0 | 80 | ******************************************************************************/ |
Kojto | 98:8ab26030e058 | 81 | /* Due to footprint considerations, we only pass file name and line number, */ |
Kojto | 98:8ab26030e058 | 82 | /* not the assert expression (nor function name (C99)) */ |
Kojto | 98:8ab26030e058 | 83 | void assertEFM(const char *file, int line); |
Kojto | 98:8ab26030e058 | 84 | #define EFM_ASSERT(expr) ((expr) ? ((void)0) : assertEFM(__FILE__, __LINE__)) |
Kojto | 98:8ab26030e058 | 85 | |
Kojto | 98:8ab26030e058 | 86 | #else |
Kojto | 98:8ab26030e058 | 87 | |
<> | 128:9bcdf88f62b0 | 88 | /** Default assertion is no operation */ |
Kojto | 98:8ab26030e058 | 89 | #define EFM_ASSERT(expr) ((void)(expr)) |
Kojto | 98:8ab26030e058 | 90 | |
Kojto | 98:8ab26030e058 | 91 | #endif /* defined(DEBUG_EFM) || defined(DEBUG_EFM_USER) */ |
Kojto | 98:8ab26030e058 | 92 | |
<> | 128:9bcdf88f62b0 | 93 | /** @} (end addtogroup ASSERT) */ |
<> | 128:9bcdf88f62b0 | 94 | /** @} (end addtogroup emlib) */ |
Kojto | 98:8ab26030e058 | 95 | |
Kojto | 98:8ab26030e058 | 96 | #ifdef __cplusplus |
Kojto | 98:8ab26030e058 | 97 | } |
Kojto | 98:8ab26030e058 | 98 | #endif |
Kojto | 98:8ab26030e058 | 99 | |
<> | 128:9bcdf88f62b0 | 100 | #endif /* EM_ASSERT_H */ |