func_ram_record.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 <stdint.h>
  29. #include "stm32f7xx_hal.h"
  30. #include "fatfs.h"
  31. /* Private includes ----------------------------------------------------------*/
  32. /* USER CODE BEGIN Includes */
  33. /* USER CODE END Includes */
  34. /* Exported types ------------------------------------------------------------*/
  35. /* Exported constants --------------------------------------------------------*/
  36. /* USER CODE BEGIN EC */
  37. /* USER CODE END EC */
  38. /* Exported macro ------------------------------------------------------------*/
  39. #define DATA_UNIT_NUM 150
  40. #define DATA_UNIT_SIZE 256
  41. /* Exported functions prototypes ---------------------------------------------*/
  42. void func_ram_record_init(void); //¼Ç¼Îļþ³õʼ»¯
  43. uint32_t func_ram_record_write(uint8_t *buf ,uint32_t len);
  44. uint32_t func_ram_record_read(uint8_t *buf ,uint32_t len);
  45. uint32_t func_ram_record_delete(uint8_t *buf,uint32_t len);
  46. void func_ram_record_test(void);
  47. uint8_t func_ram_record_fatfs_set_OK(uint8_t stat);
  48. uint8_t func_ram_record_fatfs_isOK(void);
  49. /* Private defines -----------------------------------------------------------*/
  50. #ifdef __cplusplus
  51. }
  52. #endif
  53. #endif /* FUNC_RECORD_H */
  54. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/