summaryrefslogtreecommitdiffhomepage
path: root/DDK/KernelDev.h
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-07-03 18:20:35 +0200
committerAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-07-03 18:20:35 +0200
commita7c741c93cb0a53aea686eb2f342f2464bc12c14 (patch)
tree5e90743873451c7f1bc6313d2fb210c470af2cd1 /DDK/KernelDev.h
parent8c8822fff78f9ff9cd640271da9b3634c4c2f97f (diff)
COMMIT-07-03-2024-MHR-36
IMP: DDK specification and implementation done. - Kernel calls I/O support for DDK. - System calls I/O support for DDK. - Add Allocation routines for DDK. - Add Helloconf driver. - One generic device. IMPRV: - GPU driver is now C++ based. - Fixed icon path inside makefiles. Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'DDK/KernelDev.h')
-rw-r--r--DDK/KernelDev.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/DDK/KernelDev.h b/DDK/KernelDev.h
index 79fd8f76..e4dfad2f 100644
--- a/DDK/KernelDev.h
+++ b/DDK/KernelDev.h
@@ -16,17 +16,16 @@ struct _kernelDevice;
typedef struct _kernelDevice
{
char name[255]; // the device name. Could be /./DEVICE_NAME/
- int32_t (*read)(); // read from device.
- int32_t (*write)(); // write to device.
+ void* (*read)(void* arg, int len); // read from device.
+ void (*write)(void* arg, int len);
+ void (*wait)(void); // write to device.
struct _kernelDevice* (*open)(const char* path); // open device.
void (*close)(struct _kernelDevice* dev); // close device.
} kernelDevice, *kernelDeviceRef;
-/// @brief Open a new binary device from path.
-DK_EXTERN kernelDeviceRef kernelOpenBinaryDevice(const char* devicePath);
-
-/// @brief Open a new character device from path.
-DK_EXTERN kernelDeviceRef kernelOpenCharDevice(const char* devicePath);
+/// @brief Open a new device from path.
+/// @param devicePath the device's path.
+DK_EXTERN kernelDeviceRef kernelOpenDevice(const char* devicePath);
/// @brief Close any device.
/// @param device valid device.