/** * @file FluxSD.h * @brief SD卡头文件 * * 用于存储测试日志 * * @author wang xiang en * @date 2025-04-18 * @version 版本号 * @copyright 版权声明((C)2025, YUWELL MEDTECH Co.ltd) */ #ifndef _FLUX_SD_H #define _FLUX_SD_H #pragma once #include #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include "driver/gpio.h" #include "esp_cpu.h" #include "esp_log.h" #include "esp_vfs_fat.h" #include "sdmmc_cmd.h" #include "driver/sdmmc_host.h" /* 定义块大小 */ #define EXAMPLE_MAX_CHAR_SIZE (64) /* 定义挂载点 */ #define MOUNT_POINT "/sdcard" /* 选择是否进行测试数据记录 */ #define LOG_RECORD_ENABLE 1 /* SD卡读写引脚编号 */ #define CONFIG_EXAMPLE_PIN_CLK (14) #define CONFIG_EXAMPLE_PIN_CMD (21) #define CONFIG_EXAMPLE_PIN_D0 (13) #define CONFIG_EXAMPLE_PIN_D1 (12) #define CONFIG_EXAMPLE_PIN_D2 (48) #define CONFIG_EXAMPLE_PIN_D3 (47) /* 导出SD存储信息 */ extern uint64_t total_bytes; extern uint64_t free_bytes; extern float free_percent; /** * @brief 选择引脚 * */ #define GPIO_INPUT_PIN_SEL(pin) (1ULL<