Orion
Barry Keyboard/Mouse drivers + POSIX names for structs 1628fcf (2 years, 4 months ago)#ifndef KERNEL_DRIVERS_H #define KERNEL_DRIVERS_H #include <sys/types.h> #include "../vfs/vfs.h" #define MKDEV(maj, min) ((dev_t) (((maj & 0xFFFF) << 16) | (min & 0xFFFF))) #define MAJOR(dev) ((dev >> 16) & 0xFFFF) #define MINOR(dev) (dev & 0xFFFF) typedef struct Driver Driver; /* Structure for a Driver */ struct Driver { unsigned short major; FileOps *ops; Driver *next; }; extern Driver *drivers; void init_drivers(void); void register_driver(Driver *driver); /* Drivers */ void ide_init(uint8_t bus, uint8_t slot, uint8_t func); void rtl8139_init(uint8_t bus, uint8_t dev, uint8_t func); void xhci_init(uint8_t bus, uint8_t slot, uint8_t func); void bga_init(uint8_t bus, uint8_t slot, uint8_t func); void init_tty(void); void init_kbd(void); void init_mouse(void); #endif