31 lines
657 B
C
31 lines
657 B
C
#ifndef SD_H
|
|
#define SD_H
|
|
|
|
#include <string.h>
|
|
#include <sys/unistd.h>
|
|
#include <sys/stat.h>
|
|
#include "esp_vfs_fat.h"
|
|
#include "sdmmc_cmd.h"
|
|
#include "driver/sdmmc_host.h"
|
|
|
|
#define MOUNT_POINT "/sd"
|
|
|
|
extern sdmmc_card_t *card;
|
|
|
|
#define SD_PIN_CLK GPIO_NUM_48
|
|
#define SD_PIN_CMD GPIO_NUM_45
|
|
#define SD_PIN_D0 GPIO_NUM_47
|
|
#define SD_PIN_D1 GPIO_NUM_21
|
|
#define SD_PIN_D2 GPIO_NUM_39
|
|
#define SD_PIN_D3 GPIO_NUM_38
|
|
|
|
/// @brief Initializes the SD card
|
|
///
|
|
/// This requires the char_lcd to have been initialized.
|
|
/// @return true if the sd card was successfully initialized
|
|
bool init_sd();
|
|
|
|
/// @brief Unmounts the sd card
|
|
void deinit_sd();
|
|
|
|
#endif /* SD_H */ |