|
TB2026-YDS Firmware
|
#include "sdcard.h"#include "spi_bus.h"#include "board_pins.h"#include "esp_vfs_fat.h"#include "sdmmc_cmd.h"#include "driver/sdspi_host.h"#include "driver/gpio.h"#include "esp_log.h"Macros | |
| #define | SD_MAX_OPEN_FILES 5 |
| #define | SD_ALLOC_UNIT_SIZE (16 * 1024) |
| #define | SD_DETECT_PRESENT_LEVEL 0 |
Functions | |
| esp_err_t | sdcard_mount (void) |
| Initialize SPI3, attach the card via sdspi, and mount the FAT volume. | |
| esp_err_t | sdcard_unmount (void) |
| Unmount the FAT volume and detach the sdspi device. | |
| int | sdcard_freq_khz (void) |
| Actual SPI clock negotiated with the card by the host, in kHz. | |
| bool | sdcard_present (void) |
| Report whether a card is physically inserted (synchronous read of PIN_SD_DETECT). | |
| #define SD_ALLOC_UNIT_SIZE (16 * 1024) |
| #define SD_DETECT_PRESENT_LEVEL 0 |
| #define SD_MAX_OPEN_FILES 5 |