IZAR Flight Controller 1.0.0
IZAR Flight Controller running with an ESP32.
sd.c File Reference
#include "sd.h"
#include <driver/i2c.h>
#include <driver/sdspi_host.h>
#include <errno.h>
#include <esp_log.h>
#include <esp_vfs_fat.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
Include dependency graph for sd.c:

Functions

esp_err_t init_sd_card (FILE **logFile)
esp_err_t write_to_file (FILE *file, const char *message, const char *endl)
char * sd_err_to_name (esp_err_t err)

Function Documentation

◆ init_sd_card()

esp_err_t init_sd_card ( FILE ** logFile)

Initialize SD card reader.

< host supports SPI protocol

< host deinit function called with the slot argument

< SD/MMC Default speed (limited by clock divider)

< esp_err_t value indicating success (no error)

< esp_err_t value indicating success (no error)

< esp_err_t value indicating success (no error)

Here is the caller graph for this function:

◆ sd_err_to_name()

char * sd_err_to_name ( esp_err_t err)

< esp_err_t value indicating success (no error)

◆ write_to_file()

esp_err_t write_to_file ( FILE * file,
const char * message,
const char * endl )

Writes the message to the file and saves it.

< esp_err_t value indicating success (no error)

Here is the caller graph for this function: