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:
Wed Apr 29 10:16:23 2015 +0100
Revision:
98:8ab26030e058
Child:
113:f141b2784e32
Release 98 of the mbed library

Changes:
- Silabs new targets (Giant, Zero, Happy, Leopard, Wonder Geckos)
- Asynchronous SPI, I2C, Serial
- LowPower classes
- Nordic - nordic SDK v8.0 update
- Teensy - gcc arm fix for startup
- Nucleo F411 - usb freq fix

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 98:8ab26030e058 1 /***************************************************************************//**
Kojto 98:8ab26030e058 2 * @file em_assert.h
Kojto 98:8ab26030e058 3 * @brief EFM32 peripheral API "assert" implementation.
Kojto 98:8ab26030e058 4 * @version 3.20.12
Kojto 98:8ab26030e058 5 *
Kojto 98:8ab26030e058 6 * @details
Kojto 98:8ab26030e058 7 * By default, EFM32 library assert usage is not included in order to reduce
Kojto 98:8ab26030e058 8 * footprint and processing overhead. Further, EFM32 assert usage is decoupled
Kojto 98:8ab26030e058 9 * from ISO C assert handling (NDEBUG usage), to allow a user to use ISO C
Kojto 98:8ab26030e058 10 * assert without including EFM32 assert statements.
Kojto 98:8ab26030e058 11 *
Kojto 98:8ab26030e058 12 * Below are available defines for controlling EFM32 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 98:8ab26030e058 15 * @li If DEBUG_EFM is defined, the internal EFM32 library assert handling will
Kojto 98:8ab26030e058 16 * be used, which may be a quite rudimentary implementation.
Kojto 98:8ab26030e058 17 *
Kojto 98:8ab26030e058 18 * @li If DEBUG_EFM_USER is defined instead, the user must provide its own EFM32
Kojto 98:8ab26030e058 19 * assert handling routine (assertEFM()).
Kojto 98:8ab26030e058 20 *
Kojto 98:8ab26030e058 21 * As indicated above, if none of the above defines are used, EFM32 assert
Kojto 98:8ab26030e058 22 * statements are not compiled.
Kojto 98:8ab26030e058 23 *******************************************************************************
Kojto 98:8ab26030e058 24 * @section License
Kojto 98:8ab26030e058 25 * <b>(C) Copyright 2014 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 98:8ab26030e058 51
Kojto 98:8ab26030e058 52 #ifndef __SILICON_LABS_EM_ASSERT_H_
Kojto 98:8ab26030e058 53 #define __SILICON_LABS_EM_ASSERT_H_
Kojto 98:8ab26030e058 54
Kojto 98:8ab26030e058 55 #ifdef __cplusplus
Kojto 98:8ab26030e058 56 extern "C" {
Kojto 98:8ab26030e058 57 #endif
Kojto 98:8ab26030e058 58
Kojto 98:8ab26030e058 59 /** @cond DO_NOT_INCLUDE_WITH_DOXYGEN */
Kojto 98:8ab26030e058 60
Kojto 98:8ab26030e058 61 #if defined(DEBUG_EFM) || defined(DEBUG_EFM_USER)
Kojto 98:8ab26030e058 62
Kojto 98:8ab26030e058 63 /* Due to footprint considerations, we only pass file name and line number, */
Kojto 98:8ab26030e058 64 /* not the assert expression (nor function name (C99)) */
Kojto 98:8ab26030e058 65 void assertEFM(const char *file, int line);
Kojto 98:8ab26030e058 66 #define EFM_ASSERT(expr) ((expr) ? ((void)0) : assertEFM(__FILE__, __LINE__))
Kojto 98:8ab26030e058 67
Kojto 98:8ab26030e058 68 #else
Kojto 98:8ab26030e058 69
Kojto 98:8ab26030e058 70 #define EFM_ASSERT(expr) ((void)(expr))
Kojto 98:8ab26030e058 71
Kojto 98:8ab26030e058 72 #endif /* defined(DEBUG_EFM) || defined(DEBUG_EFM_USER) */
Kojto 98:8ab26030e058 73
Kojto 98:8ab26030e058 74 /** @endcond */
Kojto 98:8ab26030e058 75
Kojto 98:8ab26030e058 76 #ifdef __cplusplus
Kojto 98:8ab26030e058 77 }
Kojto 98:8ab26030e058 78 #endif
Kojto 98:8ab26030e058 79
Kojto 98:8ab26030e058 80 #endif /* __SILICON_LABS_EM_ASSERT_H_ */