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.

Committer:
<>
Date:
Thu Oct 27 16:45:56 2016 +0100
Revision:
128:9bcdf88f62b0
Parent:
113:f141b2784e32
Child:
139:856d2700e60b
Release 128 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

2966: Add kw24 support https://github.com/ARMmbed/mbed-os/pull/2966
3068: MultiTech mDot - clean up PeripheralPins.c and add new pin names https://github.com/ARMmbed/mbed-os/pull/3068
3089: Kinetis HAL: Remove clock initialization code from serial and ticker https://github.com/ARMmbed/mbed-os/pull/3089
2943: [NRF5] NVIC_SetVector functionality https://github.com/ARMmbed/mbed-os/pull/2943
2938: InterruptIn changes in NCS36510 HAL. https://github.com/ARMmbed/mbed-os/pull/2938
3108: Fix sleep function for NRF52. https://github.com/ARMmbed/mbed-os/pull/3108
3076: STM32F1: Correct timer master value reading https://github.com/ARMmbed/mbed-os/pull/3076
3085: Add LOWPOWERTIMER capability for NUCLEO_F303ZE https://github.com/ARMmbed/mbed-os/pull/3085
3046: [BEETLE] Update BLE stack on Beetle board https://github.com/ARMmbed/mbed-os/pull/3046
3122: [Silicon Labs] Update of Silicon Labs HAL https://github.com/ARMmbed/mbed-os/pull/3122
3022: OnSemi RAM usage fix https://github.com/ARMmbed/mbed-os/pull/3022
3121: STM32F3: Correct UART4 and UART5 defines when using DEVICE_SERIAL_ASYNCH https://github.com/ARMmbed/mbed-os/pull/3121
3142: Targets- NUMAKER_PFM_NUC47216 remove mbed 2 https://github.com/ARMmbed/mbed-os/pull/3142

Who changed what in which revision?

UserRevisionLine numberNew 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.
<> 128:9bcdf88f62b0 4 * @version 5.0.0
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 */