CMD0x04_Request_ReadUpdateTimeStamp.c 875 B

1234567891011121314151617181920
  1. #include "CommandsDefine.h"
  2. #include "ProjectConfig.h"
  3. #include "usart.h"
  4. #include "string.h"
  5. #include "Helper.h"
  6. #include "iap.h"
  7. /* 获取当前程序是App还是Boot */
  8. /*
  9. 请求格式 包起始标识+CMD0x01_Request_RunningAtWhere+[0x00+0x00]+包尾标识
  10. 返回格式 包起始标识+CMD0x01_Request_RunningAtWhere+[0x00+0x01]+1Byte的RunningAtWhere+包尾标识. RunningAtWhere 约定:RUNNING_AT_APP 0x77,RUNNING_AT_BOOT 0x11
  11. */
  12. void CMD0x04_Request_ReadUpdateTimeStamp_process(u8 *pData,u16 dataLen,u8 bIsContentBitInverted_Recv,u8 bIsContentBitInverted_SendBack)
  13. {
  14. u8 dataBytes=Version_DateLength;
  15. struct BootWriteFlashInfoStruct bootWriteFlashInfo;
  16. iap_ReadBootWriteInfo(&bootWriteFlashInfo);
  17. memcpy(USART_WR_BUF,bootWriteFlashInfo.UpdateTimeStamp,dataBytes);
  18. USART6_Send(CMD0x04_Request_ReadUpdateTimeStamp,dataBytes,bIsContentBitInverted_SendBack);
  19. }