HAL_Flash_Platform.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef _HAL_FLASH_H_
  2. #define _HAL_FLASH_H_
  3. #if defined(__cplusplus)
  4. extern "C" {
  5. #endif
  6. #include "uiot_import.h"
  7. /**
  8. * @brief 设置相应name
  9. *
  10. * @param handle 指向download_name的指针
  11. * @return 指向download_name的指针
  12. */
  13. void * HAL_Download_Name_Set(void * handle);
  14. /**
  15. * @brief 分区结构体初始化以及擦除FLASH等操作
  16. *
  17. * @param name 分区名
  18. * @return 指向分区结构体的指针
  19. */
  20. void * HAL_Download_Init(_IN_ void * name);
  21. /**
  22. * @brief 将长度为length的buffer_read的数据写入到FLASH中
  23. *
  24. * @param handle 指向分区结构体的指针
  25. * @param total_length 数据包总长度
  26. * @param buffer_read 数据的指针
  27. * @param length 数据的长度,单位为字节
  28. * @return -1失败 0成功
  29. */
  30. int HAL_Download_Write(_IN_ void * handle,_IN_ uint32_t total_length,_IN_ uint8_t *buffer_read,_IN_ uint32_t length);
  31. /**
  32. * @brief STM32F767 FLASH的information分区的下载标志置位成功
  33. *
  34. * @param 指向分区结构体的指针
  35. * @return -1失败 0成功
  36. */
  37. int HAL_Download_End(_IN_ void * handle);
  38. #if defined(__cplusplus)
  39. }
  40. #endif
  41. #endif /* _HAL_FLASH_H_ */