11#include <zephyr/fs/fs.h>
21#define SD_MOUNTPOINT "/SD:"
22#define SD_ROOTPATH "/SD:/"
53int sd_open(
char const *
const path,
struct fs_file_t *f_obj);
73int sd_read(
struct fs_file_t *f_obj,
char *buffer,
size_t *size);
85int sd_read_chunk(
char const *
const path,
size_t *offset,
char *
const buffer,
size_t *size);
98int sd_write_chunk(
char const *
const path,
char const *
const data,
size_t *size);
int sd_open(char const *const path, struct fs_file_t *f_obj)
Open a file on a SD card.
int sd_list_directories(char const *const path, char *buffer, size_t *size)
List the directories on the SD card.
int sd_read(struct fs_file_t *f_obj, char *buffer, size_t *size)
Read from a file on a SD card.
int sd_close(struct fs_file_t *f_obj)
Close a file on a SD card.
int sd_read_chunk(char const *const path, size_t *offset, char *const buffer, size_t *size)
Open, read from a file on SD card and close it.
int sd_initialize(void)
Initializes the SD card communication.
int sd_write_chunk(char const *const path, char const *const data, size_t *size)
Open, write to a file on SD card and close it.
int sd_tell_end_offset(char const *const path, size_t *offset)
Get the current location of the file pointer inside the file.
char * sd_build_full_path(const char *folder, const char *filename, int *error)
Returns a char pointer on the fully built-up SD card path.