blob: 78703961a34005b498aee071db0f658f36c6a542 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
/* -------------------------------------------
Copyright ZKA Technologies.
Purpose: DDK Text I/O.
------------------------------------------- */
#include <DDK/KernelDev.h>
#include <DDK/KernelString.h>
/// @brief Open a new binary device from path.
DK_EXTERN KERNEL_DEVICE_PTR KernelOpenDevice(const char* devicePath)
{
if (!devicePath)
return nil;
return KernelCall("OpenDevice", 1, (void*)devicePath, KernelStringLength(devicePath));
}
/// @brief Close any device.
/// @param device valid device.
DK_EXTERN void KernelCloseDevice(KERNEL_DEVICE_PTR device)
{
if (!device)
return;
KernelCall("CloseDevice", 1, device, sizeof(KERNEL_DEVICE));
}
|