porklib: Simple library for programming Arduino in C
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
avr-lib/lib/sd_fat.h

32 lines
729 B

#pragma once
//
// FAT-on-SD helpers.
//
// This can be used for convenience, as it does all the init for you
// and hides the implementation. All regular ff_* functions will work on the FFILE.
//
#include <stdint.h>
#include "fat16.h"
#include "stream.h"
/** Initialize FAT16 filesystem on a SPI-connected SD card */
bool sdf_init();
/** Get first file of the root folder. */
void sdf_root(FFILE* file);
/** Get a disk label. Str should have 12 chars. */
void sdf_disk_label(char* str);
extern STREAM* sdf_stream;
/**
* Open a stream for a file. There can be only one stream at a time.
*
* The stream will operate at the current file's cursor, just like
* ff_read and ff_write.
*/
void sdf_open_stream(FFILE* file);