1 /* 2 * Copyright (c) 2023 Espressif Systems (Shanghai) Co., Ltd. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #pragma once 8 9 #include <stdlib.h> 10 11 #ifdef assert 12 #undef assert 13 #endif 14 #define assert(arg) \ 15 do { \ 16 if (!(arg)) { \ 17 ets_printf("ASSERTION FAIL @ %s:%d in function %s\n", __FILE__, __LINE__, __func__); \ 18 abort(); \ 19 } \ 20 } while(0) 21