|
PER Firmware
|
Top-level ADBMS driver state, I/O buffers, measurements, and error flags. More...
#include <adbms.h>
Public Attributes | |
| adbms_state_t | state |
| adbms_module_t | modules [ADBMS_MODULE_COUNT] |
| float | min_voltage |
| float | max_voltage |
| float | avg_voltage |
| float | sum_voltage |
| float | min_therm_temp |
| float | max_therm_temp |
| float | avg_therm_temp |
| bool | is_discharge_enabled |
| SPI_InitConfig_t * | spi |
| strbuf_t | tx_strbuf |
| uint8_t | rx_buf [ADBMS_SPI_RX_BUFFER_SIZE] |
| bool | err_spi |
| bool | err_connect |
| bool | err_rega_mismatch |
| bool | err_regb_mismatch |
| bool | err_rega_pec |
| bool | err_regb_pec |
| bool | err_cell_voltage_pecs [ADBMS6380_RDCV_CMD_COUNT] |
| bool | err_gpio_voltage_pecs [ADBMS6380_RDAUX_CMD_COUNT] |
Top-level ADBMS driver state, I/O buffers, measurements, and error flags.
| float adbms_bms_t::avg_therm_temp |
Average thermistor temperature across all modules (Celsius).
| float adbms_bms_t::avg_voltage |
Average cell voltage across all modules (volts).
| bool adbms_bms_t::err_cell_voltage_pecs[ADBMS6380_RDCV_CMD_COUNT] |
Per-command PEC error flags for cell voltage reads.
| bool adbms_bms_t::err_connect |
Set when connect/initialization sequence fails. Retry logic up to higher-level logic.
| bool adbms_bms_t::err_gpio_voltage_pecs[ADBMS6380_RDAUX_CMD_COUNT] |
Per-command PEC error flags for GPIO voltage reads.
| bool adbms_bms_t::err_rega_mismatch |
Aggregated REGA mismatch flag across modules.
| bool adbms_bms_t::err_rega_pec |
Set when REGA read has a PEC failure.
| bool adbms_bms_t::err_regb_mismatch |
Aggregated REGB mismatch flag across modules.
| bool adbms_bms_t::err_regb_pec |
Set when REGB read has a PEC failure.
| bool adbms_bms_t::err_spi |
Set on any SPI transfer/read failure. Should be a terminal error.
| bool adbms_bms_t::is_discharge_enabled |
True if cell discharge balancing is permitted by higher-level logic.
| float adbms_bms_t::max_therm_temp |
Maximum thermistor temperature across all modules (Celsius).
| float adbms_bms_t::max_voltage |
Maximum cell voltage across all modules (volts).
| float adbms_bms_t::min_therm_temp |
Minimum thermistor temperature across all modules (Celsius).
| float adbms_bms_t::min_voltage |
Minimum cell voltage across all modules (volts).
| adbms_module_t adbms_bms_t::modules[ADBMS_MODULE_COUNT] |
Per-module state and measurements.
| uint8_t adbms_bms_t::rx_buf[ADBMS_SPI_RX_BUFFER_SIZE] |
RX buffer for multi-module readouts.
| SPI_InitConfig_t* adbms_bms_t::spi |
SPI instance used for ADBMS communication (CS control is manual by ADBMS6380 driver).
| adbms_state_t adbms_bms_t::state |
Current driver state.
| float adbms_bms_t::sum_voltage |
Sum of cell voltages across all modules (volts).
| strbuf_t adbms_bms_t::tx_strbuf |
Scratch TX buffer wrapper for command/data packets.