blob: 07287b914d9decaf41b86697b1cf85d7a6959225 (
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
30
31
32
33
34
35
36
|
/* ========================================
libDDK - Device Driver Kit
Copyright 2025 - Amlal El Mahrouss and NeKernel contributors.
File: ddk_io.c
Purpose: DDK Text I/O.
======================================== */
#include <DriverKit/io.h>
DDK_EXTERN void kputc(const char ch) {
if (!ch) return;
char assembled[2] = {0};
assembled[0] = ch;
assembled[1] = 0;
ke_call_dispatch("ke_put_string", 1, assembled, 1);
}
/// @brief print string to UART.
/// @param message UART to transmit.
DDK_EXTERN void kprint(const char* message) {
if (nil == message) return;
if (*message == '\0') return;
size_t index = 0;
size_t len = kstrlen(message);
while (index < len) {
kputc(message[index]);
++index;
}
}
|