mbed official / mbed

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

Committer:
<>
Date:
Thu Oct 27 16:45:56 2016 +0100
Revision:
128:9bcdf88f62b0
Parent:
126:abea610beb85
Release 128 of the mbed library

Ports for Upcoming Targets


Fixes and Changes

2966: Add kw24 support https://github.com/ARMmbed/mbed-os/pull/2966
3068: MultiTech mDot - clean up PeripheralPins.c and add new pin names https://github.com/ARMmbed/mbed-os/pull/3068
3089: Kinetis HAL: Remove clock initialization code from serial and ticker https://github.com/ARMmbed/mbed-os/pull/3089
2943: [NRF5] NVIC_SetVector functionality https://github.com/ARMmbed/mbed-os/pull/2943
2938: InterruptIn changes in NCS36510 HAL. https://github.com/ARMmbed/mbed-os/pull/2938
3108: Fix sleep function for NRF52. https://github.com/ARMmbed/mbed-os/pull/3108
3076: STM32F1: Correct timer master value reading https://github.com/ARMmbed/mbed-os/pull/3076
3085: Add LOWPOWERTIMER capability for NUCLEO_F303ZE https://github.com/ARMmbed/mbed-os/pull/3085
3046: [BEETLE] Update BLE stack on Beetle board https://github.com/ARMmbed/mbed-os/pull/3046
3122: [Silicon Labs] Update of Silicon Labs HAL https://github.com/ARMmbed/mbed-os/pull/3122
3022: OnSemi RAM usage fix https://github.com/ARMmbed/mbed-os/pull/3022
3121: STM32F3: Correct UART4 and UART5 defines when using DEVICE_SERIAL_ASYNCH https://github.com/ARMmbed/mbed-os/pull/3121
3142: Targets- NUMAKER_PFM_NUC47216 remove mbed 2 https://github.com/ARMmbed/mbed-os/pull/3142

Who changed what in which revision?

UserRevisionLine numberNew contents of line
AnnaBridge 125:2e9cc70d1897 1 /**
AnnaBridge 125:2e9cc70d1897 2 ******************************************************************************
AnnaBridge 125:2e9cc70d1897 3 * @file assert.h
AnnaBridge 125:2e9cc70d1897 4 * @brief Defines an assertion for debugging purposes.
AnnaBridge 125:2e9cc70d1897 5 * @internal
AnnaBridge 125:2e9cc70d1897 6 * @author ON Semiconductor
AnnaBridge 125:2e9cc70d1897 7 * $Rev: 3823 $
AnnaBridge 125:2e9cc70d1897 8 * $Date: 2015-10-23 16:21:37 +0530 (Fri, 23 Oct 2015) $
AnnaBridge 125:2e9cc70d1897 9 ******************************************************************************
AnnaBridge 126:abea610beb85 10 * Copyright 2016 Semiconductor Components Industries LLC (d/b/a “ON Semiconductor”).
AnnaBridge 126:abea610beb85 11 * All rights reserved. This software and/or documentation is licensed by ON Semiconductor
AnnaBridge 126:abea610beb85 12 * under limited terms and conditions. The terms and conditions pertaining to the software
AnnaBridge 126:abea610beb85 13 * and/or documentation are available at http://www.onsemi.com/site/pdf/ONSEMI_T&C.pdf
AnnaBridge 126:abea610beb85 14 * (“ON Semiconductor Standard Terms and Conditions of Sale, Section 8 Software”) and
AnnaBridge 126:abea610beb85 15 * if applicable the software license agreement. Do not use this software and/or
AnnaBridge 126:abea610beb85 16 * documentation unless you have carefully read and you agree to the limited terms and
AnnaBridge 126:abea610beb85 17 * conditions. By using this software and/or documentation, you agree to the limited
AnnaBridge 126:abea610beb85 18 * terms and conditions.
AnnaBridge 125:2e9cc70d1897 19 *
AnnaBridge 125:2e9cc70d1897 20 * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
AnnaBridge 125:2e9cc70d1897 21 * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
AnnaBridge 125:2e9cc70d1897 22 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
AnnaBridge 125:2e9cc70d1897 23 * ON SEMICONDUCTOR SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL,
AnnaBridge 125:2e9cc70d1897 24 * INCIDENTAL, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
AnnaBridge 125:2e9cc70d1897 25 * @endinternal
AnnaBridge 125:2e9cc70d1897 26 *
AnnaBridge 125:2e9cc70d1897 27 * @details
AnnaBridge 125:2e9cc70d1897 28 * While debugging, the ASSERT macro can be used to verify the expected behaviour
AnnaBridge 125:2e9cc70d1897 29 * of the source code. If the condition that is passed as a parameter to the ASSERT
AnnaBridge 125:2e9cc70d1897 30 * macro evaluates to False, execution stops.
AnnaBridge 125:2e9cc70d1897 31 *
AnnaBridge 125:2e9cc70d1897 32 * The user has the possibility to hook into the assertion through the assertCallback
AnnaBridge 125:2e9cc70d1897 33 * callback function. Note though that the callback function must not use any
AnnaBridge 125:2e9cc70d1897 34 * functionality of the RTOS, or rely on interrupts being called. Once the function
AnnaBridge 125:2e9cc70d1897 35 * returns, it's done.
AnnaBridge 125:2e9cc70d1897 36 *
AnnaBridge 125:2e9cc70d1897 37 * @ingroup debug
AnnaBridge 125:2e9cc70d1897 38 */
AnnaBridge 125:2e9cc70d1897 39
AnnaBridge 125:2e9cc70d1897 40 #ifndef ASSERT_H_
AnnaBridge 125:2e9cc70d1897 41 #define ASSERT_H_
AnnaBridge 125:2e9cc70d1897 42
AnnaBridge 125:2e9cc70d1897 43 #ifdef __cplusplus
AnnaBridge 125:2e9cc70d1897 44 extern "C" {
AnnaBridge 125:2e9cc70d1897 45 #endif
AnnaBridge 125:2e9cc70d1897 46
AnnaBridge 125:2e9cc70d1897 47 #ifdef DEBUG
AnnaBridge 125:2e9cc70d1897 48
AnnaBridge 125:2e9cc70d1897 49 /** Executes when an assertion condition evaluates to false.
AnnaBridge 125:2e9cc70d1897 50 * @param filename The name of the current file (normally the __FILE__ macro).
AnnaBridge 125:2e9cc70d1897 51 * @param line The current line number (normally the __LINE__ macro).
AnnaBridge 125:2e9cc70d1897 52 */
AnnaBridge 125:2e9cc70d1897 53 void fOnAssert(const char *filename, unsigned int line);
AnnaBridge 125:2e9cc70d1897 54
AnnaBridge 125:2e9cc70d1897 55 /** Can be assigned to hook into the assertion. */
AnnaBridge 125:2e9cc70d1897 56 extern void (*assertCallback)(const char *filename, unsigned int line);
AnnaBridge 125:2e9cc70d1897 57
<> 128:9bcdf88f62b0 58 #define ASSERT(test) ((test) ? (void)0 : fOnAssert(__FILE__, __LINE__))
AnnaBridge 125:2e9cc70d1897 59
<> 128:9bcdf88f62b0 60 #define VERIFY(test) ASSERT(test)
AnnaBridge 125:2e9cc70d1897 61
AnnaBridge 125:2e9cc70d1897 62 #else
AnnaBridge 125:2e9cc70d1897 63
<> 128:9bcdf88f62b0 64 #define ASSERT(test) ((test) ? (void)0 : 1)
AnnaBridge 125:2e9cc70d1897 65
<> 128:9bcdf88f62b0 66 #define VERIFY(test) ((void)(test))
AnnaBridge 125:2e9cc70d1897 67
AnnaBridge 125:2e9cc70d1897 68 #endif // DEBUG
AnnaBridge 125:2e9cc70d1897 69
AnnaBridge 125:2e9cc70d1897 70 #ifdef __cplusplus
AnnaBridge 125:2e9cc70d1897 71 }
AnnaBridge 125:2e9cc70d1897 72 #endif
AnnaBridge 125:2e9cc70d1897 73
AnnaBridge 125:2e9cc70d1897 74 #endif /* ASSERT_H_ */