diff options
author | Evan Lojewski <github@meklort.com> | 2020-07-18 16:05:44 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-18 16:05:44 -0600 |
commit | 9fa97cc0e28e438f4f9fb10f311185dc6a18e674 (patch) | |
tree | b6207419e52a3be3e83bfef149add9ef3da1c229 /libs | |
parent | fb75521c041370e045eb1812aa257d5ebd2ffd32 (diff) | |
download | bcm5719-ortega-9fa97cc0e28e438f4f9fb10f311185dc6a18e674.tar.gz bcm5719-ortega-9fa97cc0e28e438f4f9fb10f311185dc6a18e674.zip |
debug: Fix ape console initialization (#93)
Diffstat (limited to 'libs')
-rw-r--r-- | libs/printf/ape_putchar.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libs/printf/ape_putchar.c b/libs/printf/ape_putchar.c index 50fd5df..2879464 100644 --- a/libs/printf/ape_putchar.c +++ b/libs/printf/ape_putchar.c @@ -53,9 +53,9 @@ static bool reset_ape_console_internal(VOLATILE SHM_t *port) port->RcpuReadPointer.r32 > sizeof(port->RcpuPrintfBuffer) || port->RcpuHostReadPointer.r32 > sizeof(port->RcpuPrintfBuffer)) { - port->RcpuWritePointer.r32 = 0; port->RcpuReadPointer.r32 = 0; port->RcpuHostReadPointer.r32 = 0; + port->RcpuWritePointer.r32 = 0; return true; } @@ -66,8 +66,16 @@ static bool reset_ape_console_internal(VOLATILE SHM_t *port) bool reset_ape_console(void) { bool was_reset = false; - was_reset = was_reset || reset_ape_console_internal(&SHM); - was_reset = was_reset || reset_ape_console_internal(&SHM1); + + if(reset_ape_console_internal(&SHM)) + { + was_reset = true; + } + + if (reset_ape_console_internal(&SHM1)) + { + was_reset = true; + } return was_reset; } |