diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-20 23:13:11 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-04-20 23:13:11 +0200 |
| commit | 155971914073bedfa585a0be4d14a40bd23e3b8f (patch) | |
| tree | f39af19dc2f1b7f33cac33eff07001b2e791f7db /Private/DriverKit/KernelPrint.h | |
| parent | 7013c094668be2204b1245496236f0cf6afa07c2 (diff) | |
MHR-9: Driver toolkit, initial commit.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/DriverKit/KernelPrint.h')
| -rw-r--r-- | Private/DriverKit/KernelPrint.h | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/Private/DriverKit/KernelPrint.h b/Private/DriverKit/KernelPrint.h index 7e25e304..36e55442 100644 --- a/Private/DriverKit/KernelPrint.h +++ b/Private/DriverKit/KernelPrint.h @@ -8,38 +8,11 @@ #pragma once -#if defined(__cplusplus) -#define DK_EXTERN extern "C" -#else -#define DK_EXTERN extern -#endif // defined(__cplusplus) - -#include <stdint.h> -#include <stddef.h> +#include <DriverKit/KernelString.h> /// @brief print character into UART. DK_EXTERN void kernelPrintChar(const char ch); -static inline size_t kernelStringLength(const char* str) { - size_t index = 0; - - while (str[index] != 0) { - ++index; - } - - return index; -} - /// @brief print string to UART. -static inline void kernelPrintStr(const char* message) { - if (!message) return; - if (*message == 0) return; - - size_t index = 0; - size_t len = kernelStringLength(message); - - while (index < len) { - kernelPrintChar(message[index]); - ++index; - } -} +/// @param message UART to transmit. +DK_EXTERN void kernelPrintStr(const char* message); |
