mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:37:34 +00:00
Kernel: Remove UART::{print_num, print_hex} since they are unused
This commit is contained in:
parent
47a58c51c6
commit
15f32379bb
1 changed files with 0 additions and 28 deletions
|
@ -27,34 +27,6 @@ public:
|
||||||
for (size_t i = 0; i < length; ++i)
|
for (size_t i = 0; i < length; ++i)
|
||||||
send(*s++);
|
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:
|
private:
|
||||||
UART();
|
UART();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue