1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 /***************************************************************************
4 * Copyright (C) 2015 Andreas Fritiofson *
5 * andreas.fritiofson@gmail.com *
6 ***************************************************************************/
8 #ifndef OPENOCD_HELPER_JEP106_H
9 #define OPENOCD_HELPER_JEP106_H
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>".
19 const char *jep106_table_manufacturer(unsigned int bank, unsigned int id);
21 static inline const char *jep106_manufacturer(unsigned int manufacturer)
23 return jep106_table_manufacturer(manufacturer >> 7, manufacturer & 0x7f);
26 #endif /* OPENOCD_HELPER_JEP106_H */