checkpatch: fix for flag --no-tree
[fw/openocd] / src / helper / jep106.h
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2
3 /***************************************************************************
4  *   Copyright (C) 2015 Andreas Fritiofson                                 *
5  *   andreas.fritiofson@gmail.com                                          *
6  ***************************************************************************/
7
8 #ifndef OPENOCD_HELPER_JEP106_H
9 #define OPENOCD_HELPER_JEP106_H
10
11 /**
12  * Get the manufacturer name associated with a JEP106 ID.
13  * @param bank The bank (number of continuation codes) of the manufacturer ID.
14  * @param id The 7-bit manufacturer ID (i.e. with parity stripped).
15  * @return A pointer to static const storage containing the name of the
16  *         manufacturer associated with bank and id, or one of the strings
17  *         "<invalid>" and "<unknown>".
18  */
19 const char *jep106_table_manufacturer(unsigned int bank, unsigned int id);
20
21 static inline const char *jep106_manufacturer(unsigned int manufacturer)
22 {
23         return jep106_table_manufacturer(manufacturer >> 7, manufacturer & 0x7f);
24 }
25
26 #endif /* OPENOCD_HELPER_JEP106_H */