1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * Copyright (c) 2014, STMicroelectronics International N.V.
4 */
5
6 /*************************************************************************
7 * 1. Includes
8 *************************************************************************/
9 #include "adbg_int.h"
10
11 /*************************************************************************
12 * 2. Definition of external constants and variables
13 *************************************************************************/
14
15
16 ADBG_ENUM_TABLE_DEFINE_BEGIN(Boolean)
17 ADBG_ENUM_TABLE_ENTRY(false),
18 ADBG_ENUM_TABLE_ENTRY(true)
19 ADBG_ENUM_TABLE_DEFINE_END(Boolean);
20
21
22 /*************************************************************************
23 * 3. File scope types, constants and variables
24 *************************************************************************/
25
26 /*************************************************************************
27 * 4. Declaration of file local functions
28 *************************************************************************/
29
30 /*************************************************************************
31 * 5. Definition of external functions
32 *************************************************************************/
Do_ADBG_GetEnumName(const int Value,const ADBG_EnumTable_t * const EnumTable_p)33 const char *Do_ADBG_GetEnumName(
34 const int Value,
35 const ADBG_EnumTable_t *const EnumTable_p
36 )
37 {
38 const ADBG_EnumTable_t *Entry_p = EnumTable_p;
39
40 for (; Entry_p->Name_p != NULL; Entry_p++) {
41 if (Entry_p->Value == Value)
42 return Entry_p->Name_p;
43 }
44 return "<unresolvable enum name>";
45 }
46
47
48 /*************************************************************************
49 * 6. Definition of internal functions
50 *************************************************************************/
51