X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/f044ca812256b421e793c4335ce1ffed74710a70..8efc0cf32160c68772a2ce1887e6a397852d3d96:/lunaix-os/includes/lunaix/device.h?ds=inline diff --git a/lunaix-os/includes/lunaix/device.h b/lunaix-os/includes/lunaix/device.h index 52df8f0..cb2c294 100644 --- a/lunaix-os/includes/lunaix/device.h +++ b/lunaix-os/includes/lunaix/device.h @@ -92,6 +92,10 @@ struct device struct { + // TODO Think about where will they fit. + int (*acquire)(struct device* dev); + int (*release)(struct device* dev); + int (*read)(struct device* dev, void* buf, size_t offset, size_t len); int (*write)(struct device* dev, void* buf, size_t offset, size_t len); int (*read_page)(struct device* dev, void* buf, size_t offset); @@ -181,6 +185,9 @@ device_create_byclass(struct devclass* class, struct hbucket* device_definitions_byif(int if_type); +struct device_def* +devdef_byclass(struct devclass* class); + void device_register_all();