Signed-off-by: Keith Packard <keithp@keithp.com>
#include "ao_bufio.h"
/* Include FAT commands */
#include "ao_bufio.h"
/* Include FAT commands */
/* Spew FAT tracing */
#define FAT_TRACE 0
/* Spew FAT tracing */
#define FAT_TRACE 0
static uint32_t ao_file_cluster_offset;
static cluster_t ao_file_cluster;
static uint8_t ao_file_opened;
static uint32_t ao_file_cluster_offset;
static cluster_t ao_file_cluster;
static uint8_t ao_file_opened;
-static uint8_t ao_filesystem_available;
static uint8_t ao_filesystem_setup;
static uint8_t ao_filesystem_status;
static uint8_t ao_filesystem_setup;
static uint8_t ao_filesystem_status;
ao_fat_write(void *src, int len)
{
uint8_t *src_b = src;
ao_fat_write(void *src, int len)
{
uint8_t *src_b = src;
uint16_t this_time;
uint16_t offset;
uint8_t *buf;
uint16_t this_time;
uint16_t offset;
uint8_t *buf;
static const char *filesystem_errors[] = {
[AO_FAT_FILESYSTEM_SUCCESS] = "FAT file system operating normally",
[AO_FAT_FILESYSTEM_MBR_READ_FAILURE] = "MBR media read error",
static const char *filesystem_errors[] = {
[AO_FAT_FILESYSTEM_SUCCESS] = "FAT file system operating normally",
[AO_FAT_FILESYSTEM_MBR_READ_FAILURE] = "MBR media read error",