mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-29 10:17:15 +02:00
IDF master 3e370c4296
* Fix build compilation due to changes in the HW_TIMER's structs * Fix compilation warnings and errors with USB * Update USBCDC.cpp * Update CMakeLists.txt * Update HWCDC.cpp
This commit is contained in:
@ -19,6 +19,7 @@
|
||||
#pragma once
|
||||
#include <sdkconfig.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include_next <assert.h>
|
||||
|
||||
@ -31,16 +32,21 @@
|
||||
*/
|
||||
#undef assert
|
||||
|
||||
/* __FILENAME__ points to the file name instead of path + filename
|
||||
* e.g __FILE__ points to "/apps/test.c" where as __FILENAME__ points to "test.c"
|
||||
*/
|
||||
#define __FILENAME__ (__builtin_strrchr( "/" __FILE__, '/') + 1)
|
||||
|
||||
#if defined(NDEBUG)
|
||||
|
||||
# define assert(__e) ((void)(__e))
|
||||
#define assert(__e) ((void)(__e))
|
||||
|
||||
#elif CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT
|
||||
|
||||
#define assert(__e) __builtin_expect(!!(__e), 1) ? (void)0 : abort()
|
||||
#define assert(__e) (__builtin_expect(!!(__e), 1) ? (void)0 : __assert_func(NULL, 0, NULL, NULL))
|
||||
|
||||
#else // !CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT
|
||||
|
||||
#define assert(__e) (__builtin_expect(!!(__e), 1) ? (void)0 : __assert_func (__FILE__, __LINE__, \
|
||||
#define assert(__e) (__builtin_expect(!!(__e), 1) ? (void)0 : __assert_func (__FILENAME__, __LINE__, \
|
||||
__ASSERT_FUNC, #__e))
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user