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
SDManager Class Reference

Manages the SD card filesystem for logging and image storage. More...

#include <sd_manager.h>

Public Member Functions

bool begin ()
 Mounts the SD card and initializes the MMC peripheral.
 
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.
 
bool append_log (const char *message)
 Appends a string of text to a log file.
 
uint64_t get_used_space ()
 Calculates the total used space on the SD card in bytes.
 
bool is_present ()
 Checks if the SD card is currently mounted and accessible.
 

Detailed Description

Manages the SD card filesystem for logging and image storage.

Member Function Documentation

◆ append_log()

bool SDManager::append_log ( const char * message)

Appends a string of text to a log file.

Parameters
messageThe text to be appended.
Returns
true if written successfully.

◆ begin()

bool SDManager::begin ( )

Mounts the SD card and initializes the MMC peripheral.

Returns
true if successfully mounted, false otherwise.

◆ get_used_space()

uint64_t SDManager::get_used_space ( )

Calculates the total used space on the SD card in bytes.

Returns
Used space in bytes.

◆ is_present()

bool SDManager::is_present ( )

Checks if the SD card is currently mounted and accessible.

Returns
true if present and mounted.

◆ save_frame()

bool SDManager::save_frame ( uint8_t * buf,
size_t len,
const char * path )

Writes a camera frame buffer to a JPEG file on the SD card.

Parameters
bufPointer to the image data buffer.
lenSize of the buffer in bytes.
pathThe full destination path (e.g., "/img/photo.jpg").
Returns
true if the file was written successfully.

The documentation for this class was generated from the following files: