uint64_t->target_addr_t for stack pointers.
[openocd.git] / src / helper / jep106.h
blob61b177a2f93d75c864a8bc165ecd354dcf4271ce
1 /***************************************************************************
2 * Copyright (C) 2015 Andreas Fritiofson *
3 * andreas.fritiofson@gmail.com *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
17 ***************************************************************************/
19 #ifndef OPENOCD_HELPER_JEP106_H
20 #define OPENOCD_HELPER_JEP106_H
22 /**
23 * Get the manufacturer name associated with a JEP106 ID.
24 * @param bank The bank (number of continuation codes) of the manufacturer ID.
25 * @param id The 7-bit manufacturer ID (i.e. with parity stripped).
26 * @return A pointer to static const storage containing the name of the
27 * manufacturer associated with bank and id, or one of the strings
28 * "<invalid>" and "<unknown>".
30 const char *jep106_table_manufacturer(unsigned int bank, unsigned int id);
32 static inline const char *jep106_manufacturer(unsigned int manufacturer)
34 return jep106_table_manufacturer(manufacturer >> 7, manufacturer & 0x7f);
37 #endif /* OPENOCD_HELPER_JEP106_H */