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