Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-dev by
targets/TARGET_ARM_SSG/TARGET_BEETLE/cordio/include/wsf/generic/wsf_assert.h@150:02e0a0aed4ec, 2016-11-08 (annotated)
- Committer:
- <>
- Date:
- Tue Nov 08 17:45:16 2016 +0000
- Revision:
- 150:02e0a0aed4ec
- Parent:
- 149:156823d33999
This updates the lib to the mbed lib v129
Who changed what in which revision?
| User | Revision | Line number | New contents of line | 
|---|---|---|---|
| <> | 144:ef7eb2e8f9f7 | 1 | /*************************************************************************************************/ | 
| <> | 144:ef7eb2e8f9f7 | 2 | /*! | 
| <> | 144:ef7eb2e8f9f7 | 3 | * \file wsf_assert.h | 
| <> | 144:ef7eb2e8f9f7 | 4 | * | 
| <> | 144:ef7eb2e8f9f7 | 5 | * \brief Assert macro. | 
| <> | 144:ef7eb2e8f9f7 | 6 | * | 
| <> | 150:02e0a0aed4ec | 7 | * $Date: 2015-10-05 09:54:16 -0700 (Mon, 05 Oct 2015) $ | 
| <> | 144:ef7eb2e8f9f7 | 8 | * $Revision: 4112 $ | 
| <> | 144:ef7eb2e8f9f7 | 9 | * | 
| <> | 150:02e0a0aed4ec | 10 | * Copyright (c) 2009 Wicentric, Inc., all rights reserved. | 
| <> | 150:02e0a0aed4ec | 11 | * Wicentric confidential and proprietary. | 
| <> | 144:ef7eb2e8f9f7 | 12 | * | 
| <> | 150:02e0a0aed4ec | 13 | * IMPORTANT. Your use of this file is governed by a Software License Agreement | 
| <> | 150:02e0a0aed4ec | 14 | * ("Agreement") that must be accepted in order to download or otherwise receive a | 
| <> | 150:02e0a0aed4ec | 15 | * copy of this file. You may not use or copy this file for any purpose other than | 
| <> | 150:02e0a0aed4ec | 16 | * as described in the Agreement. If you do not agree to all of the terms of the | 
| <> | 150:02e0a0aed4ec | 17 | * Agreement do not use this file and delete all copies in your possession or control; | 
| <> | 150:02e0a0aed4ec | 18 | * if you do not have a copy of the Agreement, you must contact Wicentric, Inc. prior | 
| <> | 150:02e0a0aed4ec | 19 | * to any use, copying or further distribution of this software. | 
| <> | 144:ef7eb2e8f9f7 | 20 | */ | 
| <> | 144:ef7eb2e8f9f7 | 21 | /*************************************************************************************************/ | 
| <> | 144:ef7eb2e8f9f7 | 22 | #ifndef WSF_ASSERT_H | 
| <> | 144:ef7eb2e8f9f7 | 23 | #define WSF_ASSERT_H | 
| <> | 144:ef7eb2e8f9f7 | 24 | |
| <> | 144:ef7eb2e8f9f7 | 25 | #ifdef __cplusplus | 
| <> | 144:ef7eb2e8f9f7 | 26 | extern "C" { | 
| <> | 144:ef7eb2e8f9f7 | 27 | #endif | 
| <> | 144:ef7eb2e8f9f7 | 28 | |
| <> | 144:ef7eb2e8f9f7 | 29 | /************************************************************************************************** | 
| <> | 144:ef7eb2e8f9f7 | 30 | Function Prototypes | 
| <> | 144:ef7eb2e8f9f7 | 31 | **************************************************************************************************/ | 
| <> | 144:ef7eb2e8f9f7 | 32 | |
| <> | 144:ef7eb2e8f9f7 | 33 | #if WSF_TOKEN_ENABLED == TRUE | 
| <> | 144:ef7eb2e8f9f7 | 34 | void WsfAssert(uint16_t modId, uint16_t line); | 
| <> | 144:ef7eb2e8f9f7 | 35 | #else | 
| <> | 144:ef7eb2e8f9f7 | 36 | void WsfAssert(const char *pFile, uint16_t line); | 
| <> | 144:ef7eb2e8f9f7 | 37 | #endif | 
| <> | 144:ef7eb2e8f9f7 | 38 | |
| <> | 144:ef7eb2e8f9f7 | 39 | /************************************************************************************************** | 
| <> | 144:ef7eb2e8f9f7 | 40 | Macros | 
| <> | 144:ef7eb2e8f9f7 | 41 | **************************************************************************************************/ | 
| <> | 144:ef7eb2e8f9f7 | 42 | |
| <> | 144:ef7eb2e8f9f7 | 43 | /*************************************************************************************************/ | 
| <> | 144:ef7eb2e8f9f7 | 44 | /*! | 
| <> | 144:ef7eb2e8f9f7 | 45 | * \def WSF_ASSERT | 
| <> | 144:ef7eb2e8f9f7 | 46 | * | 
| <> | 144:ef7eb2e8f9f7 | 47 | * \brief Run-time assert macro. The assert executes when the expression is FALSE. | 
| <> | 144:ef7eb2e8f9f7 | 48 | * | 
| <> | 144:ef7eb2e8f9f7 | 49 | * \param expr Boolean expression to be tested. | 
| <> | 144:ef7eb2e8f9f7 | 50 | */ | 
| <> | 144:ef7eb2e8f9f7 | 51 | /*************************************************************************************************/ | 
| <> | 144:ef7eb2e8f9f7 | 52 | #if WSF_ASSERT_ENABLED == TRUE | 
| <> | 144:ef7eb2e8f9f7 | 53 | #if WSF_TOKEN_ENABLED == TRUE | 
| <> | 144:ef7eb2e8f9f7 | 54 | #define WSF_ASSERT(expr) if (!(expr)) {WsfAssert(MODULE_ID, (uint16_t) __LINE__);} | 
| <> | 144:ef7eb2e8f9f7 | 55 | #else | 
| <> | 144:ef7eb2e8f9f7 | 56 | #define WSF_ASSERT(expr) if (!(expr)) {WsfAssert(__FILE__, (uint16_t) __LINE__);} | 
| <> | 144:ef7eb2e8f9f7 | 57 | #endif | 
| <> | 144:ef7eb2e8f9f7 | 58 | #else | 
| <> | 144:ef7eb2e8f9f7 | 59 | #define WSF_ASSERT(expr) | 
| <> | 144:ef7eb2e8f9f7 | 60 | #endif | 
| <> | 144:ef7eb2e8f9f7 | 61 | |
| <> | 144:ef7eb2e8f9f7 | 62 | /*************************************************************************************************/ | 
| <> | 144:ef7eb2e8f9f7 | 63 | /*! | 
| <> | 144:ef7eb2e8f9f7 | 64 | * \def WSF_CT_ASSERT | 
| <> | 144:ef7eb2e8f9f7 | 65 | * | 
| <> | 144:ef7eb2e8f9f7 | 66 | * \brief Compile-time assert macro. This macro causes a compiler error when the | 
| <> | 144:ef7eb2e8f9f7 | 67 | * expression is FALSE. Note that this macro is generally used at file scope to | 
| <> | 144:ef7eb2e8f9f7 | 68 | * test constant expressions. Errors may result of it is used in executing code. | 
| <> | 144:ef7eb2e8f9f7 | 69 | * | 
| <> | 144:ef7eb2e8f9f7 | 70 | * \param expr Boolean expression to be tested. | 
| <> | 144:ef7eb2e8f9f7 | 71 | */ | 
| <> | 144:ef7eb2e8f9f7 | 72 | /*************************************************************************************************/ | 
| <> | 144:ef7eb2e8f9f7 | 73 | #define WSF_CT_ASSERT(expr) extern char wsf_ct_assert[(expr) ? 1 : -1] | 
| <> | 144:ef7eb2e8f9f7 | 74 | |
| <> | 144:ef7eb2e8f9f7 | 75 | #ifdef __cplusplus | 
| <> | 144:ef7eb2e8f9f7 | 76 | }; | 
| <> | 144:ef7eb2e8f9f7 | 77 | #endif | 
| <> | 144:ef7eb2e8f9f7 | 78 | |
| <> | 144:ef7eb2e8f9f7 | 79 | #endif /* WSF_ASSERT_H */ | 
