Fota.h 833 B

1234567891011121314151617181920212223242526
  1. /****************************************************************************
  2. *
  3. * Copy right: Qx.ChenJie
  4. * File name: Fota.h
  5. * Description: Fota函数
  6. * History: 2021-03-15
  7. *
  8. ****************************************************************************/
  9. #include "bsp_custom.h"
  10. #define FLASH_BMS_FOTA_START_ADDR 0x2E6000
  11. #define FLASH_BMS_FOTA_LEN 0x32000 //200k
  12. #define FLASH_BMS_FOTA_END_ADDR 0x318000
  13. typedef struct _Fota_Type
  14. {
  15. bool Fota_update_error ;
  16. UINT32 Fota_All_Data_Len ;
  17. UINT32 Fota_Current_Addres ;
  18. UINT8 Fota_Recv_Data_Len ;
  19. UINT8 Fota_Recv_Data[100] ;
  20. UINT32 Fota_Flash_Addres;
  21. UINT8 Fota_CRC ;
  22. }Fota_Type;
  23. extern volatile bool NB_Fota_update_flag;
  24. extern volatile bool BMS_Fota_update_flag;
  25. void Fota_Func(UINT8 *DataPtr,INT32 connectId);