]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS-Plus/Source/FreeRTOS-IoT-Libraries/c_sdk/standard/common/include/private/iot_error.h
Remove the FreeRTOS-IoT-Libraries from FreeRTOS-Plus as it was an old copy with a...
[freertos] / FreeRTOS-Plus / Source / FreeRTOS-IoT-Libraries / c_sdk / standard / common / include / private / iot_error.h
diff --git a/FreeRTOS-Plus/Source/FreeRTOS-IoT-Libraries/c_sdk/standard/common/include/private/iot_error.h b/FreeRTOS-Plus/Source/FreeRTOS-IoT-Libraries/c_sdk/standard/common/include/private/iot_error.h
deleted file mode 100644 (file)
index 8050390..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*\r
- * Amazon FreeRTOS Common V1.0.0\r
- * Copyright (C) 2018 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
- * this software and associated documentation files (the "Software"), to deal in\r
- * the Software without restriction, including without limitation the rights to\r
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\r
- * the Software, and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be included in all\r
- * copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r
- * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\r
- * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- *\r
- * http://aws.amazon.com/freertos\r
- * http://www.FreeRTOS.org\r
- */\r
-\r
-/**\r
- * @file iot_error.h\r
- * @brief Provides macros for error checking and function cleanup.\r
- *\r
- * The macros in this file are generic. They may be customized by each library\r
- * by setting the library prefix.\r
- */\r
-\r
-#ifndef IOT_ERROR_H_\r
-#define IOT_ERROR_H_\r
-\r
-/* The config header is always included first. */\r
-#include "iot_config.h"\r
-\r
-/**\r
- * @brief Declare the status variable and an initial value.\r
- *\r
- * This macro should be at the beginning of any functions that use cleanup sections.\r
- *\r
- * @param[in] statusType The type of the status variable for this function.\r
- * @param[in] initialValue The initial value to assign to the status variable.\r
- */\r
-#define IOT_FUNCTION_ENTRY( statusType, initialValue )    statusType status = initialValue\r
-\r
-/**\r
- * @brief Declares the label that begins a cleanup section.\r
- *\r
- * This macro should be placed at the end of a function and followed by\r
- * #IOT_FUNCTION_CLEANUP_END.\r
- */\r
-#define IOT_FUNCTION_CLEANUP_BEGIN()                      iotCleanup:\r
-\r
-/**\r
- * @brief Declares the end of a cleanup section.\r
- *\r
- * This macro should be placed at the end of a function and preceded by\r
- * #IOT_FUNCTION_CLEANUP_BEGIN.\r
- */\r
-#define IOT_FUNCTION_CLEANUP_END()                        return status\r
-\r
-/**\r
- * @brief Declares an empty cleanup section.\r
- *\r
- * This macro should be placed at the end of a function to exit on error if no\r
- * cleanup is required.\r
- */\r
-#define IOT_FUNCTION_EXIT_NO_CLEANUP()                    IOT_FUNCTION_CLEANUP_BEGIN(); IOT_FUNCTION_CLEANUP_END()\r
-\r
-/**\r
- * @brief Jump to the cleanup section.\r
- */\r
-#define IOT_GOTO_CLEANUP()                                goto iotCleanup\r
-\r
-/**\r
- * @brief Assign a value to the status variable and jump to the cleanup section.\r
- *\r
- * @param[in] statusValue The value to assign to the status variable.\r
- */\r
-#define IOT_SET_AND_GOTO_CLEANUP( statusValue )           { status = ( statusValue ); IOT_GOTO_CLEANUP(); }\r
-\r
-/**\r
- * @brief Jump to the cleanup section if a condition is `false`.\r
- *\r
- * This macro may be used in place of `assert` to exit a function is a condition\r
- * is `false`.\r
- *\r
- * @param[in] condition The condition to check.\r
- */\r
-#define IOT_GOTO_CLEANUP_IF_FALSE( condition )            { if( ( condition ) == false ) { IOT_GOTO_CLEANUP(); } }\r
-\r
-/**\r
- * @brief Assign a value to the status variable and jump to the cleanup section\r
- * if a condition is `false`.\r
- *\r
- * @param[in] statusValue The value to assign to the status variable.\r
- * @param[in] condition The condition to check.\r
- */\r
-#define IOT_SET_AND_GOTO_CLEANUP_IF_FALSE( statusValue, condition ) \\r
-    if( ( condition ) == false )                                    \\r
-        IOT_SET_AND_GOTO_CLEANUP( statusValue )\r
-\r
-/**\r
- * @brief Check a condition; if `false`, assign the "Bad parameter" status value\r
- * and jump to the cleanup section.\r
- *\r
- * @param[in] libraryPrefix The library prefix of the status variable.\r
- * @param[in] condition The condition to check.\r
- */\r
-#define IOT_VALIDATE_PARAMETER( libraryPrefix, condition ) \\r
-    IOT_SET_AND_GOTO_CLEANUP_IF_FALSE( libraryPrefix ## _BAD_PARAMETER, condition )\r
-\r
-#endif /* ifndef IOT_ERROR_H_ */\r