func_lfs_record.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file : main.h
  5. * @brief : Header for main.c file.
  6. * This file contains the common defines of the application.
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * <h2><center>&copy; Copyright (c) 2019 STMicroelectronics.
  11. * All rights reserved.</center></h2>
  12. *
  13. * This software component is licensed by ST under BSD 3-Clause license,
  14. * the "License"; You may not use this file except in compliance with the
  15. * License. You may obtain a copy of the License at:
  16. * opensource.org/licenses/BSD-3-Clause
  17. *
  18. ******************************************************************************
  19. */
  20. /* USER CODE END Header */
  21. /* Define to prevent recursive inclusion -------------------------------------*/
  22. #ifndef FUNC_RECORD_H
  23. #define FUNC_RECORD_H
  24. #ifdef __cplusplus
  25. extern "C" {
  26. #endif
  27. /* Includes ------------------------------------------------------------------*/
  28. #include "stm32f7xx_hal.h"
  29. #include "fatfs.h"
  30. /* Private includes ----------------------------------------------------------*/
  31. /* USER CODE BEGIN Includes */
  32. /* USER CODE END Includes */
  33. /* Exported types ------------------------------------------------------------*/
  34. /* USER CODE BEGIN ET */
  35. /* USER CODE END ET */
  36. /* Exported constants --------------------------------------------------------*/
  37. /* USER CODE BEGIN EC */
  38. /* USER CODE END EC */
  39. /* Exported macro ------------------------------------------------------------*/
  40. /* USER CODE BEGIN EM */
  41. /* USER CODE END EM */
  42. /* Exported functions prototypes ---------------------------------------------*/
  43. void func_record_lfs_init(void); //记录文件初始化
  44. void func_record_lfs_main(void const *argument); //文件操作主函数
  45. void func_record_lfs_test(void);
  46. int32_t func_record_lfs_write(void *buf ,uint32_t len);
  47. uint32_t func_record_lfs_read(uint8_t *buf ,uint32_t len);
  48. uint32_t func_record_lfs_delete(uint8_t *buf,uint32_t len);
  49. int32_t func_record_lfs_remove(void *buf, uint32_t len);
  50. uint8_t func_record_lfs_stat_set(uint8_t stat);
  51. uint8_t func_record_lfs_stat_get(void);
  52. /* Private defines -----------------------------------------------------------*/
  53. #ifdef __cplusplus
  54. }
  55. #endif
  56. #endif /* FUNC_RECORD_H */
  57. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/