rik te winkel / mbed-dev

Dependents:   Numitron_clock

Fork of mbed-dev by mbed official

Committer:
mbed_official
Date:
Fri Jan 15 07:45:16 2016 +0000
Revision:
50:a417edff4437
Parent:
0:9b334a45a8ff
Child:
144:ef7eb2e8f9f7
Synchronized with git revision 6010f32619bfcbb01cc73747d4ff9040863482d9

Full URL: https://github.com/mbedmicro/mbed/commit/6010f32619bfcbb01cc73747d4ff9040863482d9/

Remove doubling of buffer size in realiseEndpoint()

Who changed what in which revision?

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