diff options
author | Marvin Borner | 2020-05-01 20:50:49 +0200 |
---|---|---|
committer | Marvin Borner | 2020-05-01 20:50:49 +0200 |
commit | 21106945c4a28d45334824c02f8b139d1db91c45 (patch) | |
tree | f215128167a17fa476ad32350c2b81fc4ebb0395 /src/kernel/fs/dev.h | |
parent | f0439a5dbfe2cfed3d629027d4b54b5f77f4e6de (diff) |
Added devfs and basic standard devices
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 |