Skip to content

Commit

Permalink
Merge pull request #42 from Foundation-Devices/SFT-3300-fuel-gauge
Browse files Browse the repository at this point in the history
SFT-3300: fuel gauge quickfix
  • Loading branch information
badicsalex authored Jul 31, 2024
2 parents 1b452c1 + 721693e commit 95e553d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ ovm7690-rs = { git = "https://github.com/Foundation-Devices/ovm7690-rs.git", opt
embedded-sdmmc = { version = "0.7.0", default-features = false, optional = true }
hex = { version = "0.4.3", default-features = false, optional = true }
bq24157 = { git = "https://github.com/Foundation-Devices/bq24157.git", optional = true }
bq27421 = { git = "https://github.com/Foundation-Devices/bq27421/", optional = true }
bq27421 = { git = "https://github.com/Foundation-Devices/bq27421.git", optional = true }
ehci = { git = "https://github.com/Foundation-Devices/ehci.git", optional = true }
mass-storage = { git = "https://github.com/Foundation-Devices/mass-storage.git", optional = true }
embedded-alloc = { version = "0.5.1", optional = true }
Expand Down
10 changes: 10 additions & 0 deletions scripts/reboot-in-normal-mode.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

set -euo pipefail

arm-none-eabi-gdb -q <<SCRIPT
target remote :3334
monitor halt
set *((unsigned*)0xF8048054) = 0x66830000
monitor reset
SCRIPT
2 changes: 1 addition & 1 deletion src/bin/charger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ fn _entry() -> ! {
bc_cd.set(false);

//////////////////////////////////
let mut fuel_gauge = bq27421::Bq24157::new(Twi::twi0());
let mut fuel_gauge = bq27421::Bq27421::new(Twi::twi0());
assert!(fuel_gauge.verify_chip_id().unwrap(), "unexpected fuel gauge chip ID");
writeln!(console, "Fuel gauge status: {:?}", fuel_gauge.status().unwrap()).ok();

Expand Down

0 comments on commit 95e553d

Please sign in to comment.