roo_io
API Documentation for roo_io
Loading...
Searching...
No Matches
sdspi.h
Go to the documentation of this file.
1#pragma once
2
3#if (defined(ESP_PLATFORM) || defined(ROO_TESTING))
4
5#include "driver/sdmmc_types.h"
6#include "hal/gpio_types.h"
7#include "hal/spi_types.h"
9
10namespace roo_io {
11
12// For use with esp-idf.
13//
14// You can use it in Arduino, as long as you don't have other Arduino devices on
15// the same SPI bus. Otherwise, use "roo_io/fs/esp32/arduino/sdfs.h" instead.
16class SdSpiFs : public BaseEsp32VfsFilesystem {
17 public:
20
21 MediaPresence checkMediaPresence() override;
22
23 protected:
24 friend SdSpiFs CreateSdSpiFs();
25
26 MountImpl::MountResult mountImpl(std::function<void()> unmount_fn) override;
27
29 uint32_t freq = 20000000);
30
31 void unmountImpl() override;
32
33 private:
35
37
38 std::string mount_base_path_;
40};
41
42extern SdSpiFs SDSPI;
43
44} // namespace roo_io
45
46#endif // (defined(ESP_PLATFORM) || defined(ROO_TESTING))
Definition byte.h:6
roo::basic_string_view< CharT, Traits > basic_string_view
Definition string_view.h:8