X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Ffs%2Fbattfs.h;h=acd0f974a8e8297775caeaacbbbb58e3f6887d96;hb=134049962a9e7465fbede3ab7e4d1ba9a61f814c;hp=8122330636a7c6379503a145a056967983494de0;hpb=b32d313c8386a36ed7c6dd2460bbeef82091ab14;p=bertos.git diff --git a/bertos/fs/battfs.h b/bertos/fs/battfs.h index 81223306..acd0f974 100644 --- a/bertos/fs/battfs.h +++ b/bertos/fs/battfs.h @@ -36,6 +36,12 @@ * * \brief BattFS: a filesystem for embedded platforms (interface). * TODO: Add detailed filesystem description. + * + * $WIZAR_MODULE = { + * "name" : "battfs", + * "depends" : ["rotating_hash", "kfile"], + * "configuration" : "bertos/cfg/cfg_battfs.h" + * } */ #ifndef FS_BATTFS_H @@ -108,13 +114,7 @@ struct BattFsSuper; /** * Sentinel used to keep trace of unset pages in disk->page_array. */ -#define PAGE_UNSET_SENTINEL ((1 << (CPU_BITS_PER_CHAR * sizeof(pgcnt_t))) - 1) - -/** - * Type interface for disk init function. - * \return true if all is ok, false otherwise. - */ -typedef bool (*disk_open_t) (struct BattFsSuper *d); +#define PAGE_UNSET_SENTINEL ((pgcnt_t)((1L << (CPU_BITS_PER_CHAR * sizeof(pgcnt_t))) - 1)) /** * Type interface for disk page read function. @@ -184,7 +184,6 @@ typedef uint32_t disk_size_t; ///< Type for disk sizes. typedef struct BattFsSuper { void *disk_ctx; ///< Disk context used by disk access functions. - disk_open_t open; ///< Disk init. disk_page_read_t read; ///< Page read. disk_page_load_t load; ///< Page load. disk_buffer_write_t bufferWrite; ///< Buffer write.