refactor(kernel): minor refactor. Changed naming convention
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#include <IO/Serial.h>
|
||||
#include <Arch/IO.h>
|
||||
#include <Arch/CPU.h>
|
||||
|
||||
Int32 IOSerialPutCharacter(ASCII character) {
|
||||
// TXFF -- TRansmit FIFO Full for PL011 is 5 bit of FR reg (0x18)
|
||||
UInt64 uartFR = kUARTBaseAddress + 0x18;
|
||||
|
||||
while ((IOAddressRead32(uartFR) & (1 << 5)) != 0) {
|
||||
CPUYield();
|
||||
}
|
||||
|
||||
IOAddressWrite32(kUARTBaseAddress, character);
|
||||
return character;
|
||||
}
|
||||
|
||||
Int32 IOSerialPutString(const ASCII* string) {
|
||||
Int i = 0;
|
||||
while (string[i] != '\0') {
|
||||
IOSerialPutCharacter(string[i]);
|
||||
i++;
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
Reference in New Issue
Block a user