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/dev.h | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 src/loader/inc/dev.h (limited to 'src/loader/inc/dev.h') diff --git a/src/loader/inc/dev.h b/src/loader/inc/dev.h deleted file mode 100644 index cbefe99..0000000 --- a/src/loader/inc/dev.h +++ /dev/null @@ -1,41 +0,0 @@ -// MIT License, Copyright (c) 2021 Marvin Borner - -#ifndef DEV_H -#define DEV_H - -#include -#include - -enum dev_type { - DEV_NONE, - DEV_DISK, - DEV_FB, -}; - -struct dev { - u8 id; - enum dev_type type; - char name[16]; - - s32 (*read)(void *, u32, u32, struct dev *); - s32 (*write)(const void *, u32, u32, struct dev *); - - union { - struct { - struct fs fs; - } disk; - // TODO: Other (framebuffer?) - } p; // Prototype union - - u32 data; // Optional (device-specific) data/information -}; - -struct dev *dev_get_by_id(u8 id); -struct dev *dev_get_by_name(const char *name, u32 len); -void dev_foreach(enum dev_type type, u8 (*cb)(struct dev *)); // cb=1 => break -u8 dev_register(enum dev_type type, char *name, u32 data, - s32 (*read)(void *, u32, u32, struct dev *), - s32 (*write)(const void *, u32, u32, struct dev *)); -void dev_print(void); - -#endif -- cgit v1.2.3