blob: 6399b0393d0d133f75b7f4ff433443dd20bdcb0f (
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 Web Services Co.
Purpose: DDK Text I/O.
------------------------------------------- */
#include <ddk/dev.h>
#include <ddk/str.h>
/// @brief Open a new binary device from path.
DK_EXTERN KERNEL_DEVICE_PTR KernelOpenDevice(const char* devicePath)
{
if (!devicePath)
return nil;
return KernelCall("ZkOpenDevice", 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("ZkCloseDevice", 1, device, sizeof(KERNEL_DEVICE));
}
|