|
| 1 | +/* |
| 2 | + * Copyright (c) 2025 STMicroelectronics. |
| 3 | + * |
| 4 | + ******************************************************************************** |
| 5 | + * |
| 6 | + * This software is distributed under the terms of |
| 7 | + * BSD-3-Clause. The following provisions apply : |
| 8 | + * |
| 9 | + ******************************************************************************** |
| 10 | + * |
| 11 | + * Redistribution and use in source and binary forms, with or without |
| 12 | + * modification, are permitted provided that the following conditions are met: |
| 13 | + * |
| 14 | + * 1. Redistributions of source code must retain the above copyright notice, this |
| 15 | + * list of conditions and the following disclaimer. |
| 16 | + * |
| 17 | + * 2. Redistributions in binary form must reproduce the above copyright notice, |
| 18 | + * this list of conditions and the following disclaimer in the documentation |
| 19 | + * and/or other materials provided with the distribution. |
| 20 | + * |
| 21 | + * 3. Neither the name of the copyright holder nor the names of its contributors |
| 22 | + * may be used to endorse or promote products derived from this software without |
| 23 | + * specific prior written permission. |
| 24 | + * |
| 25 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 26 | + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 27 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 28 | + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| 29 | + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 30 | + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 31 | + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 32 | + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 33 | + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 34 | + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 35 | + * |
| 36 | + ******************************************************************************** |
| 37 | + * |
| 38 | + * Description : Encoder debug definitions |
| 39 | + * |
| 40 | + ******************************************************************************** |
| 41 | + */ |
| 42 | + |
| 43 | +#ifndef __ENC_DEBUG_H__ |
| 44 | +#define __ENC_DEBUG_H__ |
| 45 | + |
| 46 | +#ifdef CONFIG_ASSERT |
| 47 | +#define STR(x) #x |
| 48 | +#define ASSERT(expr) \ |
| 49 | + do { \ |
| 50 | + if (!(expr)) { \ |
| 51 | + EWLassert((bool)(expr), STR(expr), __FILE__, __LINE__); \ |
| 52 | + } \ |
| 53 | + } while (false) |
| 54 | +#else |
| 55 | +#define ASSERT(expr) |
| 56 | +#endif |
| 57 | + |
| 58 | +#if CONFIG_VC8000NANOE_LOG_LEVEL >= 4 /* LOG_LEVEL_DBG */ |
| 59 | +#define DEBUG_PRINT(s) EWLtrace(s); |
| 60 | +#define COMMENT(s) EWLtrace(s); |
| 61 | +#define APITRACE(s) EWLtrace(s); |
| 62 | +#define APITRACEPARAM(p,v) EWLtraceparam(" %s: %d\n",p,(unsigned int)(v)); |
| 63 | +#define APITRACEPARAMX(p,v) EWLtraceparam(" %s: 0x%x\n",p,(unsigned int)(v)); |
| 64 | +#define TRACE_BIT_STREAM(v,n) |
| 65 | +#else |
| 66 | +#define DEBUG_PRINT(s) |
| 67 | +#define COMMENT(s) |
| 68 | +#define APITRACE(s) |
| 69 | +#define APITRACEPARAM(p,v) |
| 70 | +#define APITRACEPARAMX(p,v) |
| 71 | +#define TRACE_BIT_STREAM(v,n) |
| 72 | +#endif |
| 73 | + |
| 74 | +#endif |
0 commit comments