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:
Kojto
Date:
Tue Feb 02 14:43:35 2016 +0000
Revision:
113:f141b2784e32
Parent:
98:8ab26030e058
Child:
128:9bcdf88f62b0
Release 113 of the mbed library

Changes:
- new targets - Silabs Perl Gecko, TY51822
- Silabs - emlib update to 4.1.0, various bugfixes as result
- STM B96B_F446VE - add async serial support
- Freescale KLXX - rtc lock fix
- LPC11U68 and LPC1549 - pwm bugfixes - duty cycle

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.
Kojto 113:f141b2784e32 4 * @version 4.2.1
Kojto 98:8ab26030e058 5 *
Kojto 98:8ab26030e058 6 * @details
Kojto 113:f141b2784e32 7 * By default, emlib library assert usage is not included in order to reduce
Kojto 113:f141b2784e32 8 * footprint and processing overhead. Further, emlib assert usage is decoupled
Kojto 98:8ab26030e058 9 * from ISO C assert handling (NDEBUG usage), to allow a user to use ISO C
Kojto 113:f141b2784e32 10 * assert without including emlib assert statements.
Kojto 98:8ab26030e058 11 *
Kojto 113:f141b2784e32 12 * Below are available defines for controlling emlib assert inclusion. The defines
Kojto 98:8ab26030e058 13 * are typically defined for a project to be used by the preprocessor.
Kojto 98:8ab26030e058 14 *
Kojto 113:f141b2784e32 15 * @li If DEBUG_EFM is defined, the internal emlib library assert handling will
Kojto 98:8ab26030e058 16 * be used, which may be a quite rudimentary implementation.
Kojto 98:8ab26030e058 17 *
Kojto 113:f141b2784e32 18 * @li If DEBUG_EFM_USER is defined instead, the user must provide their own
Kojto 98:8ab26030e058 19 * assert handling routine (assertEFM()).
Kojto 98:8ab26030e058 20 *
Kojto 113:f141b2784e32 21 * As indicated above, if none of the above defines are used, emlib assert
Kojto 98:8ab26030e058 22 * statements are not compiled.
Kojto 98:8ab26030e058 23 *******************************************************************************
Kojto 98:8ab26030e058 24 * @section License
Kojto 113:f141b2784e32 25 * <b>(C) Copyright 2015 Silicon Labs, http://www.silabs.com</b>
Kojto 98:8ab26030e058 26 *******************************************************************************
Kojto 98:8ab26030e058 27 *
Kojto 98:8ab26030e058 28 * Permission is granted to anyone to use this software for any purpose,
Kojto 98:8ab26030e058 29 * including commercial applications, and to alter it and redistribute it
Kojto 98:8ab26030e058 30 * freely, subject to the following restrictions:
Kojto 98:8ab26030e058 31 *
Kojto 98:8ab26030e058 32 * 1. The origin of this software must not be misrepresented; you must not
Kojto 98:8ab26030e058 33 * claim that you wrote the original software.
Kojto 98:8ab26030e058 34 * 2. Altered source versions must be plainly marked as such, and must not be
Kojto 98:8ab26030e058 35 * misrepresented as being the original software.
Kojto 98:8ab26030e058 36 * 3. This notice may not be removed or altered from any source distribution.
Kojto 98:8ab26030e058 37 *
Kojto 98:8ab26030e058 38 * DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no
Kojto 98:8ab26030e058 39 * obligation to support this Software. Silicon Labs is providing the
Kojto 98:8ab26030e058 40 * Software "AS IS", with no express or implied warranties of any kind,
Kojto 98:8ab26030e058 41 * including, but not limited to, any implied warranties of merchantability
Kojto 98:8ab26030e058 42 * or fitness for any particular purpose or warranties against infringement
Kojto 98:8ab26030e058 43 * of any proprietary rights of a third party.
Kojto 98:8ab26030e058 44 *
Kojto 98:8ab26030e058 45 * Silicon Labs will not be liable for any consequential, incidental, or
Kojto 98:8ab26030e058 46 * special damages, or any other relief, or for any claim by any third party,
Kojto 98:8ab26030e058 47 * arising from your use of this Software.
Kojto 98:8ab26030e058 48 *
Kojto 98:8ab26030e058 49 ******************************************************************************/
Kojto 98:8ab26030e058 50
Kojto 113:f141b2784e32 51 #ifndef __SILICON_LABS_EM_ASSERT_H__
Kojto 113:f141b2784e32 52 #define __SILICON_LABS_EM_ASSERT_H__
Kojto 98:8ab26030e058 53
Kojto 98:8ab26030e058 54 #ifdef __cplusplus
Kojto 98:8ab26030e058 55 extern "C" {
Kojto 98:8ab26030e058 56 #endif
Kojto 98:8ab26030e058 57
Kojto 98:8ab26030e058 58 /** @cond DO_NOT_INCLUDE_WITH_DOXYGEN */
Kojto 98:8ab26030e058 59
Kojto 98:8ab26030e058 60 #if defined(DEBUG_EFM) || defined(DEBUG_EFM_USER)
Kojto 98:8ab26030e058 61
Kojto 98:8ab26030e058 62 /* Due to footprint considerations, we only pass file name and line number, */
Kojto 98:8ab26030e058 63 /* not the assert expression (nor function name (C99)) */
Kojto 98:8ab26030e058 64 void assertEFM(const char *file, int line);
Kojto 98:8ab26030e058 65 #define EFM_ASSERT(expr) ((expr) ? ((void)0) : assertEFM(__FILE__, __LINE__))
Kojto 98:8ab26030e058 66
Kojto 98:8ab26030e058 67 #else
Kojto 98:8ab26030e058 68
Kojto 98:8ab26030e058 69 #define EFM_ASSERT(expr) ((void)(expr))
Kojto 98:8ab26030e058 70
Kojto 98:8ab26030e058 71 #endif /* defined(DEBUG_EFM) || defined(DEBUG_EFM_USER) */
Kojto 98:8ab26030e058 72
Kojto 98:8ab26030e058 73 /** @endcond */
Kojto 98:8ab26030e058 74
Kojto 98:8ab26030e058 75 #ifdef __cplusplus
Kojto 98:8ab26030e058 76 }
Kojto 98:8ab26030e058 77 #endif
Kojto 98:8ab26030e058 78
Kojto 113:f141b2784e32 79 #endif /* __SILICON_LABS_EM_ASSERT_H__ */