+/**
+ * Size of the header once saved on disk.
+ * \see battfs_to_disk
+ * \see disk_to_battfs
+ */
+#define BATTFS_HEADER_LEN 12
+
+/**
+ * Marks for valid pages.
+ * Simply set to 1 all field bits.
+ * \{
+ */
+#define MARK_PAGE_VALID ((1 << (CPU_BITS_PER_CHAR * sizeof(pgcnt_t) + 1)) - 1)
+#define FCS_FREE_VALID ((1 << (CPU_BITS_PER_CHAR * sizeof(fcs_t))) - 1)
+/* \} */
+
+
+/**
+ * Half-size of free page marker.
+ * Used to keep trace of free marker wrap-arounds.
+ */
+#define MARK_HALF_SIZE (1 << (CPU_BITS_PER_CHAR * sizeof(pgcnt_t) + 1))
+
+/**
+ * Maximum page address.
+ */
+#define MAX_PAGE_ADDR ((1 << (CPU_BITS_PER_CHAR * sizeof(pgcnt_t))) - 1)
+
+/**
+ * Max number of files.
+ */
+#define BATTFS_MAX_FILES (1 << (CPU_BITS_PER_CHAR * sizeof(inode_t)))
+
+/* Fwd decl */
+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);
+
+/**
+ * Type interface for disk page read function.
+ * \a page is the page address, \a addr the address inside the page,
+ * \a size the lenght to be read.
+ * \return the number of bytes read.
+ */
+typedef size_t (*disk_page_read_t) (struct BattFsSuper *d, pgcnt_t page, pgaddr_t addr, void *buf, size_t);
+
+/**
+ * Type interface for disk page write function.
+ * \a page is the page address, \a addr the address inside the page,
+ * \a size the lenght to be written.
+ * \return the number of bytes written.
+ */
+typedef size_t (*disk_page_write_t) (struct BattFsSuper *d, pgcnt_t page, pgaddr_t addr, const void *buf, size_t);