diff options
| author | hathach <[email protected]> | 2018-03-29 13:42:55 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-03-29 13:42:55 +0700 |
| commit | d88ae5cc16ad5e1d8c4ffbebe3a465123b340aef (patch) | |
| tree | 95f362cf4b2e8b01906c1fdcb194f70429457348 /tinyusb/common | |
| parent | 0a162a7d28ca5ba9aabc9a6be397af00ff6f42e6 (diff) | |
rename ASSERT_STATUS to ASSERT_ERR, merge assertion.h to verify.h
Diffstat (limited to 'tinyusb/common')
| -rw-r--r-- | tinyusb/common/assertion.h | 94 | ||||
| -rw-r--r-- | tinyusb/common/tusb_common.h | 1 |
2 files changed, 0 insertions, 95 deletions
diff --git a/tinyusb/common/assertion.h b/tinyusb/common/assertion.h deleted file mode 100644 index d7dcbe603..000000000 --- a/tinyusb/common/assertion.h +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************/
-/*!
- @file assertion.h
- @author hathach (tinyusb.org)
-
- @section LICENSE
-
- Software License Agreement (BSD License)
-
- Copyright (c) 2013, hathach (tinyusb.org)
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- 3. Neither the name of the copyright holders nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- This file is part of the tinyusb stack.
-*/
-/**************************************************************************/
-
-/** \ingroup Group_Common
- * \defgroup group_assertion Assertion
- * @{ */
-
-
-#ifndef _TUSB_ASSERTION_H_
-#define _TUSB_ASSERTION_H_
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-#include <stdbool.h>
-#include <stdint.h>
-#include "tusb_option.h"
-#include "tusb_compiler.h"
-
-#define VOID_RETURN
-
-//#if ( defined CFG_PRINTF_UART || defined CFG_PRINTF_USBCDC || defined CFG_PRINTF_DEBUG )
-#if TUSB_CFG_DEBUG
- #define _PRINTF(...) printf(__VA_ARGS__)
-#else
- #define _PRINTF(...)
-#endif
-
-//--------------------------------------------------------------------+
-// Assert Helper
-//--------------------------------------------------------------------+
-#define _ASSERT_MESSAGE(format, ...) _PRINTF("Assert at %s: %s: %d: " format "\n", __BASE_FILE__, __func__ , __LINE__, __VA_ARGS__)
-
-#define ASSERT_DEFINE(setup_statement, condition, error, format, ...) \
- do{\
- setup_statement;\
- if (!(condition)) {\
- verify_breakpoint();\
- _ASSERT_MESSAGE(format, __VA_ARGS__);\
- return error; /* Throw X for Test */\
- }\
- }while(0)
-
-//--------------------------------------------------------------------+
-// tusb_error_t Status Assert TODO use ASSERT_DEFINE
-//--------------------------------------------------------------------+
-#define ASSERT_STATUS(sts) \
- ASSERT_DEFINE(tusb_error_t status = (tusb_error_t)(sts),\
- TUSB_ERROR_NONE == status, status, "%s", tusb_strerr[status])
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _TUSB_ASSERTION_H_ */
-
-/** @} */
diff --git a/tinyusb/common/tusb_common.h b/tinyusb/common/tusb_common.h index 2aefdc540..f961a6a29 100644 --- a/tinyusb/common/tusb_common.h +++ b/tinyusb/common/tusb_common.h @@ -63,7 +63,6 @@ //------------- General Header -------------//
#include "tusb_compiler.h"
-#include "assertion.h"
#include "verify.h"
#include "binary.h"
#include "tusb_error.h"
|
