2
0

boardinfo.h 523 B

123456789101112131415161718192021222324252627282930
  1. #ifndef BOARDINFO_H
  2. #define BOARDINFO_H
  3. #include "compiler.h"
  4. #define BOARDINFO_SIZE 4096
  5. #define BOARDINFO_MAGIC_1 0x6682df97
  6. #define BOARDINFO_MAGIC_2 0xe2a0d506
  7. #define IBLK_MAX_MAC_ADDR 8
  8. struct board_info {
  9. uint32_t magic[2];
  10. uint32_t len;
  11. uint32_t crc; /* 32-bit CRC calculated with crc = 0 */
  12. char version_str[256];
  13. uint8_t mac[IBLK_MAX_MAC_ADDR][6];
  14. };
  15. union board_info_block {
  16. struct board_info i;
  17. uint8_t b[BOARDINFO_SIZE];
  18. };
  19. extern_c struct board_info board_info;
  20. #endif