nvrampeek.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*====================================================================*
  2. *
  3. * Copyright (c) 2013 Qualcomm Atheros, Inc.
  4. *
  5. * All rights reserved.
  6. *
  7. *====================================================================*/
  8. /*====================================================================*
  9. *
  10. * void nvrampeek(struct config_nvram * config_nvram);
  11. *
  12. * nvram.h
  13. *
  14. * print an nvram configuration block;
  15. *
  16. * Contributor(s):
  17. * Charles Maier <cmaier@qca.qualcomm.com>
  18. *
  19. *--------------------------------------------------------------------*/
  20. #ifndef NVRAMPEEK_SOURCE
  21. #define NVRAMPEEK_SOURCE
  22. #include <stdio.h>
  23. #include "../ram/nvram.h"
  24. #include "../tools/memory.h"
  25. #include "../tools/symbol.h"
  26. void nvrampeek (struct config_nvram * config_nvram)
  27. {
  28. printf ("TYPE=0x%02X ", LE32TOH (config_nvram->NVRAMTYPE));
  29. printf ("(%s) ", NVRAMName (LE32TOH (config_nvram->NVRAMTYPE)));
  30. printf ("PAGE=0x%04X ", LE32TOH (config_nvram->NVRAMPAGE));
  31. printf ("BLOCK=0x%04X ", LE32TOH (config_nvram->NVRAMBLOCK));
  32. printf ("SIZE=0x%04X ", LE32TOH (config_nvram->NVRAMSIZE));
  33. printf ("(%d) ", LE32TOH (config_nvram->NVRAMSIZE));
  34. printf ("\n");
  35. return;
  36. }
  37. #endif