this hurts
Dependencies: FFT
mbed/platform/mbed_assert.h@7:0d62545e6d73, 2020-12-03 (annotated)
- Committer:
- shyamgatech
- Date:
- Thu Dec 03 18:15:35 2020 +0000
- Revision:
- 7:0d62545e6d73
- Parent:
- 0:d6c9b09b4042
addded gui mbed code;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
annieluo2 | 0:d6c9b09b4042 | 1 | |
annieluo2 | 0:d6c9b09b4042 | 2 | /** \addtogroup platform */ |
annieluo2 | 0:d6c9b09b4042 | 3 | /** @{*/ |
annieluo2 | 0:d6c9b09b4042 | 4 | /* mbed Microcontroller Library |
annieluo2 | 0:d6c9b09b4042 | 5 | * Copyright (c) 2006-2013 ARM Limited |
annieluo2 | 0:d6c9b09b4042 | 6 | * |
annieluo2 | 0:d6c9b09b4042 | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
annieluo2 | 0:d6c9b09b4042 | 8 | * you may not use this file except in compliance with the License. |
annieluo2 | 0:d6c9b09b4042 | 9 | * You may obtain a copy of the License at |
annieluo2 | 0:d6c9b09b4042 | 10 | * |
annieluo2 | 0:d6c9b09b4042 | 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
annieluo2 | 0:d6c9b09b4042 | 12 | * |
annieluo2 | 0:d6c9b09b4042 | 13 | * Unless required by applicable law or agreed to in writing, software |
annieluo2 | 0:d6c9b09b4042 | 14 | * distributed under the License is distributed on an "AS IS" BASIS, |
annieluo2 | 0:d6c9b09b4042 | 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
annieluo2 | 0:d6c9b09b4042 | 16 | * See the License for the specific language governing permissions and |
annieluo2 | 0:d6c9b09b4042 | 17 | * limitations under the License. |
annieluo2 | 0:d6c9b09b4042 | 18 | */ |
annieluo2 | 0:d6c9b09b4042 | 19 | #ifndef MBED_ASSERT_H |
annieluo2 | 0:d6c9b09b4042 | 20 | #define MBED_ASSERT_H |
annieluo2 | 0:d6c9b09b4042 | 21 | |
annieluo2 | 0:d6c9b09b4042 | 22 | #ifdef __cplusplus |
annieluo2 | 0:d6c9b09b4042 | 23 | extern "C" { |
annieluo2 | 0:d6c9b09b4042 | 24 | #endif |
annieluo2 | 0:d6c9b09b4042 | 25 | |
annieluo2 | 0:d6c9b09b4042 | 26 | /** Internal mbed assert function which is invoked when MBED_ASSERT macro failes. |
annieluo2 | 0:d6c9b09b4042 | 27 | * This function is active only if NDEBUG is not defined prior to including this |
annieluo2 | 0:d6c9b09b4042 | 28 | * assert header file. |
annieluo2 | 0:d6c9b09b4042 | 29 | * In case of MBED_ASSERT failing condition, error() is called with the assertation message. |
annieluo2 | 0:d6c9b09b4042 | 30 | * @param expr Expresion to be checked. |
annieluo2 | 0:d6c9b09b4042 | 31 | * @param file File where assertation failed. |
annieluo2 | 0:d6c9b09b4042 | 32 | * @param line Failing assertation line number. |
annieluo2 | 0:d6c9b09b4042 | 33 | */ |
annieluo2 | 0:d6c9b09b4042 | 34 | void mbed_assert_internal(const char *expr, const char *file, int line); |
annieluo2 | 0:d6c9b09b4042 | 35 | |
annieluo2 | 0:d6c9b09b4042 | 36 | #ifdef __cplusplus |
annieluo2 | 0:d6c9b09b4042 | 37 | } |
annieluo2 | 0:d6c9b09b4042 | 38 | #endif |
annieluo2 | 0:d6c9b09b4042 | 39 | |
annieluo2 | 0:d6c9b09b4042 | 40 | #ifdef NDEBUG |
annieluo2 | 0:d6c9b09b4042 | 41 | #define MBED_ASSERT(expr) ((void)0) |
annieluo2 | 0:d6c9b09b4042 | 42 | |
annieluo2 | 0:d6c9b09b4042 | 43 | #else |
annieluo2 | 0:d6c9b09b4042 | 44 | #define MBED_ASSERT(expr) \ |
annieluo2 | 0:d6c9b09b4042 | 45 | do { \ |
annieluo2 | 0:d6c9b09b4042 | 46 | if (!(expr)) { \ |
annieluo2 | 0:d6c9b09b4042 | 47 | mbed_assert_internal(#expr, __FILE__, __LINE__); \ |
annieluo2 | 0:d6c9b09b4042 | 48 | } \ |
annieluo2 | 0:d6c9b09b4042 | 49 | } while (0) |
annieluo2 | 0:d6c9b09b4042 | 50 | #endif |
annieluo2 | 0:d6c9b09b4042 | 51 | |
annieluo2 | 0:d6c9b09b4042 | 52 | #endif |
annieluo2 | 0:d6c9b09b4042 | 53 | |
annieluo2 | 0:d6c9b09b4042 | 54 | /** @}*/ |