aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKing Kévin <kingkevin@cuvoodoo.info>2021-05-14 14:50:02 +0200
committerKing Kévin <kingkevin@cuvoodoo.info>2021-05-14 14:50:02 +0200
commit9c9893e1da834388e49d11d3d0899e7e7d156808 (patch)
tree8df962c4065506b34133639820406ccd2e58c2a0
parenta716cb10cf4a31ffe90ce34821aa9d42d9b560f0 (diff)
application: minor, double ensure debug info is only show with DEBUG enabledstm32f4
-rw-r--r--application.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/application.c b/application.c
index e1b8171..ba21734 100644
--- a/application.c
+++ b/application.c
@@ -384,26 +384,26 @@ void main(void)
#if DEBUG
// show reset cause
if (RCC_CSR & (RCC_CSR_LPWRRSTF | RCC_CSR_WWDGRSTF | RCC_CSR_IWDGRSTF | RCC_CSR_SFTRSTF | RCC_CSR_PORRSTF | RCC_CSR_PINRSTF)) {
- puts("reset cause(s):");
+ puts_debug("reset cause(s):");
if (RCC_CSR & RCC_CSR_LPWRRSTF) {
- puts(" low-power");
+ puts_debug(" low-power");
}
if (RCC_CSR & RCC_CSR_WWDGRSTF) {
- puts(" window-watchdog");
+ puts_debug(" window-watchdog");
}
if (RCC_CSR & RCC_CSR_IWDGRSTF) {
- puts(" independent-watchdog");
+ puts_debug(" independent-watchdog");
}
if (RCC_CSR & RCC_CSR_SFTRSTF) {
- puts(" software");
+ puts_debug(" software");
}
if (RCC_CSR & RCC_CSR_PORRSTF) {
- puts(" POR/PDR");
+ puts_debug(" POR/PDR");
}
if (RCC_CSR & RCC_CSR_PINRSTF) {
- puts(" pin");
+ puts_debug(" pin");
}
- putc('\n');
+ puts_debug("\n");
RCC_CSR |= RCC_CSR_RMVF; // clear reset flags
}
#endif