X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Ffs%2Fbattfs.h;h=d621c795f5ad6983c5324b97450f186565442f32;hb=214612327f6fe0111c487f4019599e285a14f446;hp=846027271b2a484c9f95c915a10bee5ab5828f00;hpb=ffea13d5f49cb87705f3bcc3b245cc4c68566296;p=bertos.git diff --git a/bertos/fs/battfs.h b/bertos/fs/battfs.h index 84602727..d621c795 100644 --- a/bertos/fs/battfs.h +++ b/bertos/fs/battfs.h @@ -108,13 +108,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. @@ -183,7 +177,7 @@ typedef uint32_t disk_size_t; ///< Type for disk sizes. */ typedef struct BattFsSuper { - disk_open_t open; ///< Disk init. + void *disk_ctx; ///< Disk context used by disk access functions. disk_page_read_t read; ///< Page read. disk_page_load_t load; ///< Page load. disk_buffer_write_t bufferWrite; ///< Buffer write.