roo_io
API Documentation for roo_io
Loading...
Searching...
No Matches
sdmmc.h
Go to the documentation of this file.
1
#pragma once
2
3
#if (defined ESP32 && defined ARDUINO)
4
5
#include "soc/soc_caps.h"
6
7
#if SOC_SDMMC_HOST_SUPPORTED
8
9
#include <Arduino.h>
10
#include <SD_MMC.h>
11
12
#include <functional>
13
#include <string>
14
15
#include "
roo_io/base/string_view.h
"
16
#include "
roo_io/fs/esp32/base_vfs_filesystem.h
"
17
#include "
roo_io/fs/posix/posix_mount.h
"
18
19
namespace
roo_io
{
20
21
// Exposes the roo_io::Filesystem interface over the native ESP32 Arduino SD
22
// implementation, using the VFS API and Posix interface to the file system.
23
// Internally uses the SD_MMC object. If you don't care to use the SD_MMC object
24
// directly, you might as well use the esp-idf/sdmmc.h version.
25
class
ArduinoSdMmcFs
:
public
BaseEsp32VfsFilesystem
{
26
public
:
27
void
setPins
(
uint8_t
pin_clk
,
uint8_t
pin_cmd
,
uint8_t
pin_d0
);
28
29
void
setPins
(
uint8_t
pin_clk
,
uint8_t
pin_cmd
,
uint8_t
pin_d0
,
uint8_t
pin_d1
,
30
uint8_t
pin_d2
,
uint8_t
pin_d3
);
31
32
MediaPresence checkMediaPresence()
override
;
33
34
protected
:
35
MountImpl::MountResult mountImpl(std::function<
void
()>
unmount_fn
)
override
;
36
37
void
unmountImpl()
override
;
38
39
private
:
40
friend
ArduinoSdMmcFs
CreateArduinoSdMmcFs
();
41
42
ArduinoSdMmcFs
();
43
44
bool
mode_1bit_
;
45
46
std::string
mount_base_path_
;
47
};
48
49
extern
ArduinoSdMmcFs
SD_MMC
;
50
51
}
// namespace roo_io
52
53
#endif
// SOC_SDMMC_HOST_SUPPORTED
54
#endif
// (defined ESP32 && defined ARDUINO)
base_vfs_filesystem.h
roo_io
Definition
byte.h:6
roo_io::basic_string_view
roo::basic_string_view< CharT, Traits > basic_string_view
Definition
string_view.h:8
posix_mount.h
string_view.h
temp_repos
roo_io
src
roo_io
fs
esp32
arduino
sdmmc.h
Generated by
1.9.8