?? wosfs.h
字號:
// file: wosfs.h
//
// the WAY Oversimplified Filing System
//
// 2000 September 8
//
// An even more simplified file system code
// than
//
// Proposed API for storage subsystem.
//Comments solicited.
//
// These are the API call for an overly simple
// filing system, which should be sufficient for
// our MP3 demonstration.
//
// All routines return an int, which is 0 for
// success and <0 for failure.
//
// It is presumed that there is exactly
// one OSFS on a computer.
//
// The file system supports a single
// directory with named, byte-oriented
// files, and a "write-once-read-many" model.
// (That is, bytes can only be added to the
// very end of the very last file.)
//
// ==================
#include "nios.h"
// |
// | Define range of flash memory to be
// | treated as the file system. You can
// | override this with a compile-time -D option.
// |
#ifndef nk_wosfs_flash_begin
#define nk_wosfs_flash_begin (nasys_main_flash + 0x400000)
#endif
#ifndef nk_wosfs_flash_end
#define nk_wosfs_flash_end (nasys_main_flash + 0x600000)
#endif
#define nk_wosfs_file_name_size 32
#define nk_wosfs_signature ((long) 0x89674523)
typedef struct
{
long signature;
long file_count;
} ns_wosfs_volume_header;
typedef struct
{
char name[nk_wosfs_file_name_size];
long location;
long file_length;
} ns_wosfs_directory_entry;
long nr_wosfst_get_file_count(void);
void nr_wosfs_get_directory_entry(long file_index,ns_wosfs_directory_entry *de_out);
long nr_wosfs_get_directory_entry_by_name(char *file_name,ns_wosfs_directory_entry *de_out);
void nr_wosfs_read(long file_index,long offset,long length,void *data_out);
int nr_wosfs_string_match(char *a, char *b); // return 1 if match
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -