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 OmniWheels by
fnet_assert.h
00001 /************************************************************************** 00002 * 00003 * Copyright 2016 by Andrey Butok. FNET Community. 00004 * 00005 *************************************************************************** 00006 * 00007 * Licensed under the Apache License, Version 2.0 (the "License"); you may 00008 * not use this file except in compliance with the License. 00009 * You may obtain a copy of the License at 00010 * 00011 * http://www.apache.org/licenses/LICENSE-2.0 00012 * 00013 * Unless required by applicable law or agreed to in writing, software 00014 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 00015 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00016 * See the License for the specific language governing permissions and 00017 * limitations under the License. 00018 * 00019 **********************************************************************/ 00020 /*! 00021 * @brief FNET assert macros. 00022 * 00023 ***************************************************************************/ 00024 #ifndef _FNET_ASSERT_H_ 00025 #define _FNET_ASSERT_H_ 00026 00027 #if FNET_CFG_ASSERT 00028 00029 #define FNET_ASSERT_ERROR_MESSAGE "FNET ASSERT: %s: %s: %d\n\r" 00030 00031 /* Checks that the given condition is true, otherwise it prints error message 00032 * and stops the program execution.*/ 00033 #define FNET_ASSERT(condition) \ 00034 if (!(condition)) \ 00035 { \ 00036 printf(FNET_ASSERT_ERROR_MESSAGE, __func__, __FILE__, __LINE__); \ 00037 while (1); \ 00038 } 00039 #else 00040 #define FNET_ASSERT(condition) ((void) 0) 00041 #endif 00042 00043 #endif /* _FNET_ASSERT_H_ */ 00044
Generated on Fri Jul 22 2022 04:53:49 by
1.7.2
