#include "byteordering.h"#include "partition.h"#include "fat.h"#include "fat_config.h"#include "sd-reader_config.h"#include <string.h>

Go to the source code of this file.
Data Structures | |
| struct | fat_header_struct |
| struct | fat_fs_struct |
| struct | fat_file_struct |
| struct | fat_dir_struct |
| struct | fat_read_dir_callback_arg |
| struct | fat_usage_count_callback_arg |
Defines | |
| #define | FAT16_CLUSTER_FREE 0x0000 |
| #define | FAT16_CLUSTER_RESERVED_MIN 0xfff0 |
| #define | FAT16_CLUSTER_RESERVED_MAX 0xfff6 |
| #define | FAT16_CLUSTER_BAD 0xfff7 |
| #define | FAT16_CLUSTER_LAST_MIN 0xfff8 |
| #define | FAT16_CLUSTER_LAST_MAX 0xffff |
| #define | FAT32_CLUSTER_FREE 0x00000000 |
| #define | FAT32_CLUSTER_RESERVED_MIN 0x0ffffff0 |
| #define | FAT32_CLUSTER_RESERVED_MAX 0x0ffffff6 |
| #define | FAT32_CLUSTER_BAD 0x0ffffff7 |
| #define | FAT32_CLUSTER_LAST_MIN 0x0ffffff8 |
| #define | FAT32_CLUSTER_LAST_MAX 0x0fffffff |
| #define | FAT_DIRENTRY_DELETED 0xe5 |
| #define | FAT_DIRENTRY_LFNLAST (1 << 6) |
| #define | FAT_DIRENTRY_LFNSEQMASK ((1 << 6) - 1) |
Functions | |
| static uint8_t | fat_read_header (struct fat_fs_struct *fs) |
| static cluster_t | fat_get_next_cluster (const struct fat_fs_struct *fs, cluster_t cluster_num) |
| static offset_t | fat_cluster_offset (const struct fat_fs_struct *fs, cluster_t cluster_num) |
| static uint8_t | fat_dir_entry_read_callback (uint8_t *buffer, offset_t offset, void *p) |
| static uint8_t | fat_calc_83_checksum (const uint8_t *file_name_83) |
| static uint8_t | fat_get_fs_free_16_callback (uint8_t *buffer, offset_t offset, void *p) |
| static cluster_t | fat_append_clusters (struct fat_fs_struct *fs, cluster_t cluster_num, cluster_t count) |
| static uint8_t | fat_free_clusters (struct fat_fs_struct *fs, cluster_t cluster_num) |
| static uint8_t | fat_terminate_clusters (struct fat_fs_struct *fs, cluster_t cluster_num) |
| static uint8_t | fat_clear_cluster (const struct fat_fs_struct *fs, cluster_t cluster_num) |
| static uintptr_t | fat_clear_cluster_callback (uint8_t *buffer, offset_t offset, void *p) |
| static offset_t | fat_find_offset_for_dir_entry (struct fat_fs_struct *fs, const struct fat_dir_struct *parent, const struct fat_dir_entry_struct *dir_entry) |
| static uint8_t | fat_write_dir_entry (const struct fat_fs_struct *fs, struct fat_dir_entry_struct *dir_entry) |
| struct fat_fs_struct * | fat_open (struct partition_struct *partition) |
| void | fat_close (struct fat_fs_struct *fs) |
| uint8_t | fat_get_dir_entry_of_path (struct fat_fs_struct *fs, const char *path, struct fat_dir_entry_struct *dir_entry) |
| struct fat_file_struct * | fat_open_file (struct fat_fs_struct *fs, const struct fat_dir_entry_struct *dir_entry) |
| void | fat_close_file (struct fat_file_struct *fd) |
| intptr_t | fat_read_file (struct fat_file_struct *fd, uint8_t *buffer, uintptr_t buffer_len) |
| intptr_t | fat_write_file (struct fat_file_struct *fd, const uint8_t *buffer, uintptr_t buffer_len) |
| uint8_t | fat_seek_file (struct fat_file_struct *fd, int32_t *offset, uint8_t whence) |
| uint8_t | fat_resize_file (struct fat_file_struct *fd, uint32_t size) |
| struct fat_dir_struct * | fat_open_dir (struct fat_fs_struct *fs, const struct fat_dir_entry_struct *dir_entry) |
| void | fat_close_dir (struct fat_dir_struct *dd) |
| uint8_t | fat_read_dir (struct fat_dir_struct *dd, struct fat_dir_entry_struct *dir_entry) |
| uint8_t | fat_reset_dir (struct fat_dir_struct *dd) |
| uint8_t | fat_create_file (struct fat_dir_struct *parent, const char *file, struct fat_dir_entry_struct *dir_entry) |
| uint8_t | fat_delete_file (struct fat_fs_struct *fs, struct fat_dir_entry_struct *dir_entry) |
| uint8_t | fat_create_dir (struct fat_dir_struct *parent, const char *dir, struct fat_dir_entry_struct *dir_entry) |
| offset_t | fat_get_fs_size (const struct fat_fs_struct *fs) |
| offset_t | fat_get_fs_free (const struct fat_fs_struct *fs) |
Variables | |
| static struct fat_fs_struct | fat_fs_handles [FAT_FS_COUNT] |
| static struct fat_file_struct | fat_file_handles [FAT_FILE_COUNT] |
| static struct fat_dir_struct | fat_dir_handles [FAT_DIR_COUNT] |
Definition in file fat.c.
| #define FAT16_CLUSTER_BAD 0xfff7 |
| #define FAT16_CLUSTER_FREE 0x0000 |
Definition at line 70 of file fat.c.
Referenced by fat_append_clusters(), fat_free_clusters(), fat_get_fs_free_16_callback(), and fat_get_next_cluster().
| #define FAT16_CLUSTER_LAST_MAX 0xffff |
Definition at line 75 of file fat.c.
Referenced by fat_append_clusters(), fat_free_clusters(), fat_get_next_cluster(), and fat_terminate_clusters().
| #define FAT16_CLUSTER_LAST_MIN 0xfff8 |
| #define FAT16_CLUSTER_RESERVED_MAX 0xfff6 |
| #define FAT16_CLUSTER_RESERVED_MIN 0xfff0 |
| #define FAT32_CLUSTER_BAD 0x0ffffff7 |
| #define FAT32_CLUSTER_FREE 0x00000000 |
Definition at line 77 of file fat.c.
Referenced by fat_append_clusters(), fat_free_clusters(), and fat_get_next_cluster().
| #define FAT32_CLUSTER_LAST_MAX 0x0fffffff |
Definition at line 82 of file fat.c.
Referenced by fat_append_clusters(), fat_free_clusters(), fat_get_next_cluster(), and fat_terminate_clusters().
| #define FAT32_CLUSTER_LAST_MIN 0x0ffffff8 |
| #define FAT32_CLUSTER_RESERVED_MAX 0x0ffffff6 |
| #define FAT32_CLUSTER_RESERVED_MIN 0x0ffffff0 |
| #define FAT_DIRENTRY_DELETED 0xe5 |
Definition at line 84 of file fat.c.
Referenced by fat_delete_file(), fat_dir_entry_read_callback(), fat_find_offset_for_dir_entry(), and fat_write_dir_entry().
| #define FAT_DIRENTRY_LFNLAST (1 << 6) |
struct fat_dir_struct fat_dir_handles[FAT_DIR_COUNT] [static] |
struct fat_file_struct fat_file_handles[FAT_FILE_COUNT] [static] |
struct fat_fs_struct fat_fs_handles[FAT_FS_COUNT] [static] |
1.5.6