include/fs/tsfs.h File Reference

Tiny Simple File System (TSFS) header file. More...

#include <stdint.h>
#include <mainloop.h>
#include <status_codes.h>
#include <block/device.h>

Go to the source code of this file.

Data Structures

struct  tsfs_file
 Holds information about a specific file within a file system. More...
struct  tsfs_header
 Header structure. Holds generic information about the file system. More...
struct  tsfs_read_request
 Holds current read request being processed by a file system. More...
struct  tsfs_filetable_entry
 Holds information on one file in the file table. More...
struct  tsfs
 Holds information on a TSFS instance. More...

Defines

#define TSFS_ID   0x17c1
 Unique ID to identify TSFS.
#define TSFS_FILENAME_LEN   8
 Max characters in a filename.
#define TSFS_MAX_FILES   31
 Max number of files supported.
#define TSFS_BLOCKSIZE   512
 Size of block in bytes.

Enumerations

enum  tsfs_seek_origin { SEEK_SET, SEEK_CUR, SEEK_END }
 

The relative starting point of seek operations.

More...

Functions

status_t tsfs_init (struct tsfs *tsfs, struct block_device *system_blockdevice, struct workqueue_task *system_ready_task)
 Initiates a Tiny Simple File System.
status_t tsfs_open (struct tsfs *tsfs, const char *filename, struct tsfs_file *filehandle)
 Opens a file by populating a file handle.
status_t tsfs_seek (struct tsfs_file *file, int32_t offset, enum tsfs_seek_origin origin)
 Manualy move the file cursor.
status_t tsfs_read (struct tsfs *tsfs, struct tsfs_file *file, void *buffer, uint32_t length, struct workqueue_task *task)
 Reads a chunk of data from a file to a buffer.
void tsfs_get_filename (struct tsfs *tsfs, uint_fast8_t file_index, uint8_t *buffer)
 Reads the filename of an indexed file into a buffer.
static uint32_t tsfs_get_file_size (struct tsfs_file *file)
 Get the file size in bytes for file file.
static uint32_t tsfs_nr_files (struct tsfs *tsfs)
 Returns the number of files present in a file system.
static uint32_t tsfs_volume_size (struct tsfs *tsfs)
 Returns the size of the entire volume.
static uint32_t tsfs_is_ready (struct tsfs *tsfs)
 Check if file system is ready for use.

Detailed Description

Tiny Simple File System (TSFS) header file.

Copyright (C) 2010 Atmel Corporation. All rights reserved.

Definition in file tsfs.h.

Generated on Thu Apr 29 14:09:58 2010 for display-demo by  doxygen 1.6.3