diff options
author | Uros Majstorovic <majstor@majstor.org> | 2025-07-28 23:27:12 +0200 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2025-07-28 23:27:12 +0200 |
commit | 58f41971b1e801ad2fbcea08e5152afa2b18ca73 (patch) | |
tree | 51793b55b350f7807d5d1b7e1401b50f402ccc48 /fw/fe310/eos/dev/batt.c | |
parent | dab5a1fbd188f8f9436df1b3dff6e344c444fc23 (diff) |
sys logging added; power management reimplemented; bugfixes;
Diffstat (limited to 'fw/fe310/eos/dev/batt.c')
-rw-r--r-- | fw/fe310/eos/dev/batt.c | 10 |
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 |