Kernel: Remove UART::{print_num, print_hex} since they are unused

This commit is contained in:
Timon Kruiper 2022-05-02 20:21:06 +02:00 committed by Linus Groh
parent 47a58c51c6
commit 15f32379bb
Notes: sideshowbarker 2024-07-17 11:22:34 +09:00

View file

@ -27,34 +27,6 @@ public:
for (size_t i = 0; i < length; ++i)
send(*s++);
}
void print_num(u64 n)
{
char buf[21];
int i = 0;
do {
buf[i++] = (n % 10) + '0';
n /= 10;
} while (n);
for (i--; i >= 0; i--)
send(buf[i]);
}
void print_hex(u64 n)
{
char buf[17];
static char const* digits = "0123456789ABCDEF";
int i = 0;
do {
buf[i++] = digits[n % 16];
n /= 16;
} while (n);
send(static_cast<u32>('0'));
send(static_cast<u32>('x'));
buf[16] = '\0';
for (i--; i >= 0; i--) {
send(buf[i]);
}
}
private:
UART();