summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/dev/batt.c
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310/eos/dev/batt.c')
-rw-r--r--fw/fe310/eos/dev/batt.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fw/fe310/eos/dev/batt.c b/fw/fe310/eos/dev/batt.c
index 6f1eb97..45e6af0 100644
--- a/fw/fe310/eos/dev/batt.c
+++ b/fw/fe310/eos/dev/batt.c
@@ -2,14 +2,12 @@
#include <stdint.h>
#include "eos.h"
+#include "log.h"
+
#include "soc/pwr.h"
#include "drv/bq25895.h"
-#ifdef EOS_DEBUG
-#include <stdio.h>
-#endif
-
int eos_batt_init(void) {
uint8_t wakeup_cause;
int rst, rv;
@@ -31,10 +29,10 @@ int eos_batt_init(void) {
if (rv) return rv;
#ifdef EOS_DEBUG
- printf("BQ25895:\n");
+ EOS_LOG(EOS_LOG_INFO, "BQ25895:\n");
for (i=0; i<0x15; i++) {
rv = bq25895_reg_read(i, &data);
- if (!rv) printf(" REG%.2X: %.2X\n", i, data);
+ if (!rv) EOS_LOG(EOS_LOG_INFO, " REG%.2X: %.2X\n", i, data);
}
#endif