diff options
Diffstat (limited to 'src/kernel/fs/dev.h')
-rw-r--r-- | src/kernel/fs/dev.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/kernel/fs/dev.h b/src/kernel/fs/dev.h new file mode 100644 index 0000000..40263e6 --- /dev/null +++ b/src/kernel/fs/dev.h @@ -0,0 +1,25 @@ +#ifndef MELVIX_DEV_H +#define MELVIX_DEV_H + +#include <stdint.h> +#include <kernel/fs/vfs.h> + +struct dev { + char name[128]; + uint32_t block_size; + read read; + write write; + + uint8_t bus; + uint8_t drive; +}; + +void dev_make(char *name, read read, write write); +uint32_t dev_read(struct fs_node *dev, uint32_t offset, uint32_t size, char *buffer); +uint32_t dev_write(struct fs_node *dev, uint32_t offset, uint32_t size, char *buffer); + +void dev_stdout(); +void dev_stdin(); +void dev_stderr(); + +#endif
\ No newline at end of file |