diff options
author | Uros Majstorovic <majstor@majstor.org> | 2021-12-09 23:50:58 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2021-12-09 23:50:58 +0100 |
commit | 7d03a941be6e9226e71cb5f5b4f7949e06bbfb02 (patch) | |
tree | cde9218dbe97837f972c426552c463f5f2a6a256 /fw/fe310/eos/i2c | |
parent | 9c8f5a5e8f11e4a5012d55b96afae290242b8fdd (diff) |
improved init process
Diffstat (limited to 'fw/fe310/eos/i2c')
-rw-r--r-- | fw/fe310/eos/i2c/bq25895.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fw/fe310/eos/i2c/bq25895.c b/fw/fe310/eos/i2c/bq25895.c index f8923c6..570e9a0 100644 --- a/fw/fe310/eos/i2c/bq25895.c +++ b/fw/fe310/eos/i2c/bq25895.c @@ -3,7 +3,7 @@ #include <stdio.h> #include "eos.h" -#include "power.h" +#include "pwr.h" #include "i2c.h" #include "i2c/bq25895.h" @@ -20,8 +20,6 @@ int eos_bq25895_init(uint8_t wakeup_cause) { int i, rv = EOS_OK; uint8_t data = 0; - rv = eos_i2c_start(); - if (rv) return rv; if (rst) { rv = reg_write(0x14, 0x80); // reset if (rv) printf("I2C ERROR 0x14\n"); @@ -40,7 +38,6 @@ int eos_bq25895_init(uint8_t wakeup_cause) { rv = reg_read(i, &data); if (!rv) printf("REG%02x: %02x\n", i, data); } - eos_i2c_stop(); return EOS_OK; } |