bpmpfw uart changes
This commit is contained in:
1 parent
6b88b43cb9
commit
4ac7f472d9
3 files changed
+17
-4
No files matched your search
@@ -33,7 +33,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
bool g_uartLoggingEnabled = true;
|
||||
bool g_uartLoggingEnabled = false;
|
||||
|
||||
void UartPutc(char c) {
|
||||
if (!g_uartLoggingEnabled) {
|
||||
@@ -64,3 +64,14 @@ void UartPutHex32(u32 v) {
|
||||
UartPutc(digits[(v >> i) & 0xF]);
|
||||
}
|
||||
}
|
||||
|
||||
void UartPutsForce(const char *s) {
|
||||
while (*s) {
|
||||
while (!(MMIO32(UartBBase + UartLsr) & UartLsrThre))
|
||||
;
|
||||
MMIO32(UartBBase + UartThr) = static_cast<u32>(static_cast<u8>(*s++));
|
||||
}
|
||||
|
||||
while (!(MMIO32(UartBBase + UartLsr) & UartLsrTmty))
|
||||
;
|
||||
}
|
||||
Reference in new issue
Block a user