refactor: replace all stdint::uint32_t into short and more manageable u32_t
[lunaix-os.git] / lunaix-os / includes / lunaix / device.h
index c456df41bc6c08b960d66667a091e7ee54e0e859..1c2445b04f84930b86f699d34daab3d3964670d0 100644 (file)
@@ -19,7 +19,7 @@ typedef unsigned int dev_t;
 
 struct device
 {
-    uint32_t magic;
+    u32_t magic;
     struct llist_header siblings;
     struct llist_header children;
     struct device* parent;
@@ -30,14 +30,16 @@ struct device
     void* underlay;
     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 (*exec_cmd)(struct device* dev, uint32_t req, va_list args);
+    int (*read_page)(struct device* dev, void* buf, size_t offset);
+    int (*write_page)(struct device* dev, void* buf, size_t offset);
+    int (*exec_cmd)(struct device* dev, u32_t req, va_list args);
 };
 
 struct device*
 device_add(struct device* parent,
            void* underlay,
            char* name_fmt,
-           uint32_t type,
+           u32_t type,
            va_list args);
 
 struct device*