Skip to content

Instantly share code, notes, and snippets.

View rtek1000's full-sized avatar

rtek1000

  • None
  • Unknown
View GitHub Profile
@rtek1000
rtek1000 / format_sdcard.c
Created March 10, 2024 04:27 — forked from dizcza/format_sdcard.c
ESP-IDF format an SD card
#include "ff.h"
#include "vfs_fat_internal.h"
/**
* Usage:
* // See https://github.com/espressif/esp-idf/blob/b63ec47238fd6aa6eaa59f7ad3942cbdff5fcc1f/examples/storage/sd_card/sdmmc/main/sd_card_example_main.c#L75
* esp_vfs_fat_sdmmc_mount(mount_point, &host, &slot_config, &mount_config, &card);
* format_sdcard(card);
* // proceed without remounting
*/