From 1b429c0fc28e5cd8b474ad5a1de1fa6f3d7c2e2a Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Mon, 12 Jul 2021 18:14:44 +0200 Subject: Renamed files to match presentation --- src/loader/inc/disk.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/loader/inc/disk.h (limited to 'src/loader/inc/disk.h') diff --git a/src/loader/inc/disk.h b/src/loader/inc/disk.h new file mode 100644 index 0000000..e4fb285 --- /dev/null +++ b/src/loader/inc/disk.h @@ -0,0 +1,21 @@ +// MIT License, Copyright (c) 2021 Marvin Borner + +#ifndef DISK_H +#define DISK_H + +#include + +// General disk assumptions +#define BLOCK_SIZE 1024 +#define BLOCK_COUNT 256 // BLOCK_SIZE / sizeof(u32) +#define SECTOR_SIZE 512 +#define SECTOR_COUNT (BLOCK_SIZE / SECTOR_SIZE) // 2 + +struct dev; +struct fs { + s32 (*read)(const char *, void *, u32, u32, struct dev *); +}; + +void disk_detect(struct dev *dev); + +#endif -- cgit v1.2.3