mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-20 01:45:07 -04:00
exo2: suspend fixes (sleep/wake now works on hardware)
This commit is contained in:
parent
2fb363dcf0
commit
95d38a1a94
10 changed files with 77 additions and 18 deletions
|
@ -21,6 +21,7 @@ namespace ams::log {
|
|||
|
||||
constexpr inline uart::Port UartLogPort = uart::Port_ReservedDebug;
|
||||
constinit bool g_initialized_uart = false;
|
||||
constinit bool g_logging_enabled = false;
|
||||
|
||||
constexpr inline u32 UartPortFlags = [] {
|
||||
if constexpr (UartLogPort == uart::Port_ReservedDebug) {
|
||||
|
@ -75,14 +76,18 @@ namespace ams::log {
|
|||
g_initialized_uart = false;
|
||||
}
|
||||
|
||||
void SetDebugLogEnabled(bool en) {
|
||||
g_logging_enabled = en;
|
||||
}
|
||||
|
||||
void SendText(const void *text, size_t size) {
|
||||
if (g_initialized_uart) {
|
||||
if (g_initialized_uart && g_logging_enabled) {
|
||||
uart::SendText(UartLogPort, text, size);
|
||||
}
|
||||
}
|
||||
|
||||
void Flush() {
|
||||
if (g_initialized_uart) {
|
||||
if (g_initialized_uart && g_logging_enabled) {
|
||||
uart::WaitFlush(UartLogPort);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue