jep106.c 792 B

1234567891011121314151617181920212223242526
  1. /* https://github.com/openocd-org/openocd/blob/master/src/helper/ */
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. /***************************************************************************
  4. * Copyright (C) 2015 Andreas Fritiofson *
  5. * andreas.fritiofson@gmail.com *
  6. ***************************************************************************/
  7. #include "jep106.h"
  8. static const char* const jep106[][126] = {
  9. #include "jep106.inc"
  10. };
  11. const char* jep106_table_manufacturer(unsigned int bank, unsigned int id) {
  12. if(id < 1 || id > 126) {
  13. return "<invalid>";
  14. }
  15. /* index is zero based */
  16. id--;
  17. if(bank >= 14 || jep106[bank][id] == 0) return "<unknown>";
  18. return jep106[bank][id];
  19. }