MBIC_Bootloader.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * MBIC_Bootloader.h
  3. *
  4. * Created on: 2020. 5. 18.
  5. * Author: parkyj
  6. */
  7. #ifndef MBIC_BOOTLOADER_H_
  8. #define MBIC_BOOTLOADER_H_
  9. #define MBIC_HEADER_SIZE 22
  10. #define MBIC_TAIL_SIZE 3
  11. #define MBIC_PREAMBLE0 0x16
  12. #define MBIC_PREAMBLE1 0x16
  13. #define MBIC_PREAMBLE2 0x16
  14. #define MBIC_PREAMBLE3 0x16
  15. #define MBIC_SUBUID0 0x00
  16. #define MBIC_SUBUID1 0xF1
  17. #define MBIC_RCODE
  18. #define MBIC_TRID
  19. #define MBIC_SEQNUM
  20. #define MBIC_TTL
  21. #define MBIC_TIME
  22. #define MBIC_ERRRESPONSE 0x00
  23. #define MBIC_CMD
  24. #define MBIC_LENGTH
  25. #define MBIC_CHECKSHUM_INDEX MBIC_HEADER_SIZE - 1 //CheckSUM REMOVE INDEX
  26. #define MBIC_ETX 0x03
  27. #define MBIC_NODE_MU 0x80
  28. #define MARK_START_POSITION 0
  29. #define TYPE_START_POSITION 9
  30. #define FILE_TYPE_START_POSITION 10
  31. #define VERSION_START_POSITION 11
  32. #define FILENAME_START_POSITION 14
  33. #define CREATION_TIME_START_POSITION 55
  34. #define LENGTH_START_POSITION 61
  35. #define CRC_START_POSITION 65
  36. #define RESERVED_START_POSITION 69
  37. typedef struct{
  38. uint16_t Length;
  39. uint16_t Crcchk;
  40. bool FileChk;
  41. }BootLoaderDataCheck_st;
  42. #endif /* MBIC_BOOTLOADER_H_ */