Smart Camera ESP32
An AI-driven, real-time Sentry Turret platform leveraging asynchronous I/O and computer vision to deliver high-precision autonomous motion tracking on resource-constrained embedded hardware.
Loading...
Searching...
No Matches
sd_manager.h
1
6#pragma once
7
8#include "FS.h"
9#include "SD_MMC.h"
10
16{
17private:
18 const char* _root = "/";
19 bool _is_mounted = false;
20
21public:
26 bool begin();
27
35 bool save_frame(uint8_t* buf, size_t len, const char* path);
36
42 bool append_log(const char* message);
43
48 uint64_t get_used_space();
49
54 bool is_present();
55};
Manages the SD card filesystem for logging and image storage.
Definition sd_manager.h:16
bool append_log(const char *message)
Appends a string of text to a log file.
Definition sd_manager.cpp:50
uint64_t get_used_space()
Calculates the total used space on the SD card in bytes.
Definition sd_manager.cpp:75
bool begin()
Mounts the SD card and initializes the MMC peripheral.
Definition sd_manager.cpp:4
bool save_frame(uint8_t *buf, size_t len, const char *path)
Writes a camera frame buffer to a JPEG file on the SD card.
Definition sd_manager.cpp:26
bool is_present()
Checks if the SD card is currently mounted and accessible.
Definition sd_manager.cpp:85