blob: 5ed482b9a80b51dbff490b2969a13c6b22e9d8be (
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 <DDKit/KernelDev.h>
#include <DDKit/KernelString.h>
/// @brief Open a new binary device from path.
DK_EXTERN kernelDeviceRef 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(kernelDeviceRef device)
{
if (!device)
return;
kernelCall("CloseDevice", 1, device, sizeof(kernelDevice));
}
|