From a189aa7f9c4ad5e85551092f28bd1b5fc69771f2 Mon Sep 17 00:00:00 2001 From: Jack Rubacha Date: Fri, 24 Jan 2025 21:15:21 -0500 Subject: [PATCH] fmt --- Core/Src/adi_interaction.c | 8 +++++--- Core/Src/segment.c | 3 ++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Core/Src/adi_interaction.c b/Core/Src/adi_interaction.c index 461cd21..e7b321a 100644 --- a/Core/Src/adi_interaction.c +++ b/Core/Src/adi_interaction.c @@ -149,7 +149,8 @@ void adbms_wake_isospi() * @brief Wake the chip of every ADBMS6830 IC. Blocking wait about 1ms * NUM_CHIPS * */ -void adbms_wake_core() { +void adbms_wake_core() +{ for (uint8_t ic = 0; ic < NUM_CHIPS; ic++) { adBmsCsLow(); adBmsCsHigh(); @@ -228,10 +229,11 @@ void read_adbms_data(cell_asic chips[NUM_CHIPS], uint8_t command[2], TYPE type, // --- BEGIN WRITE COMMANDS --- -void soft_reset_chips(cell_asic chips[NUM_CHIPS]) { +void soft_reset_chips(cell_asic chips[NUM_CHIPS]) +{ write_adbms_data(chips, SRST, Comm, NONE); adbms_wake_core(); -} +} void write_config_regs(cell_asic chips[NUM_CHIPS]) { diff --git a/Core/Src/segment.c b/Core/Src/segment.c index 2c7cb6b..8370def 100644 --- a/Core/Src/segment.c +++ b/Core/Src/segment.c @@ -211,7 +211,8 @@ void segment_retrieve_debug_data(acc_data_t *bmsdata) //segment_adc_comparison(bmsdata); } -void segment_restart(acc_data_t *bmsdata) { +void segment_restart(acc_data_t *bmsdata) +{ soft_reset_chips(bmsdata->chips); segment_init(bmsdata); }