foxBMS
1.1.1
The foxBMS Battery Management System API Documentation
|
Headers for the driver for the LTC monitoring chip. More...
#include "general.h"
#include "diag_cfg.h"
#include "ltc_cfg.h"
#include "database.h"
#include "spi.h"
Go to the source code of this file.
Data Structures | |
struct | LTC_ERRORTABLE_s |
struct | LTC_OPENWIRE_DETECTION_s |
struct | LTC_MUX_CH_CFG_s |
struct | LTC_MUX_SEQUENCE_s |
struct | LTC_DATAPTR_s |
struct | LTC_ERROR_s |
struct | LTC_CONFIG_s |
struct | LTC_REQUEST_s |
struct | LTC_STATE_s |
Headers for the driver for the LTC monitoring chip.
SPDX-License-Identifier: BSD-3-Clause
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
We kindly request you to use one or more of the following phrases to refer to foxBMS in your hardware, software, documentation or advertising materials:
Definition in file ltc_defs.h.
enum LTC_ADCMEAS_CHAN_e |
Number of measured channels
Definition at line 103 of file ltc_defs.h.
enum LTC_ADCMODE_e |
Voltage measurement mode DCP0 means discharged not permitted during measurement DCP1 means discharged permitted during measurement Also DCP0 means balancing is interrupted when a cell is measured.
Definition at line 92 of file ltc_defs.h.
TI port expander IO direction (input or output). Here the value in the enum is needed because it is written in a configuration register.
Enumerator | |
---|---|
LTC_PORT_EXPANDER_TI_OUTPUT | |
LTC_PORT_EXPANDER_TI_INPUT |
Definition at line 504 of file ltc_defs.h.
enum LTC_RETURN_TYPE_e |
Possible return values when state requests are made to the LTC statemachine
Definition at line 395 of file ltc_defs.h.
enum LTC_REUSE_MODE_e |
Enumerator | |
---|---|
LTC_NOT_REUSED | |
LTC_REUSE_READVOLT_FOR_ADOW_PUP | |
LTC_REUSE_READVOLT_FOR_ADOW_PDOWN |
Definition at line 493 of file ltc_defs.h.
enum LTC_STATE_REQUEST_e |
State requests for the LTC statemachine
Definition at line 362 of file ltc_defs.h.
Substates for ADC accuracy check
Enumerator | |
---|---|
LTC_REQUEST_ADC1_VERIFICATION | |
LTC_READ_ADC1_VERIFICATION_VALUE | |
LTC_SAVE_ADC1_VERIFICATION_VALUE | |
LTC_REQUEST_ADC2_VERIFICATION | |
LTC_READ_ADC2_VERIFICATION_VALUE | |
LTC_EXIT_ADC_ACCURACY_CHECK |
Definition at line 251 of file ltc_defs.h.
Substates for the balance control state
Definition at line 214 of file ltc_defs.h.
Substates for diagnosis state
Definition at line 240 of file ltc_defs.h.
Substates for digital filter check
Definition at line 261 of file ltc_defs.h.
enum LTC_STATEMACH_e |
States of the LTC state machine
Definition at line 116 of file ltc_defs.h.
Substates for the EEPROM control state
Definition at line 305 of file ltc_defs.h.
Substates for the initialization state
Enumerator | |
---|---|
LTC_INIT_STRING | |
LTC_ENTRY_INITIALIZATION | |
LTC_START_INIT_INITIALIZATION | |
LTC_RE_ENTRY_INITIALIZATION | |
LTC_READ_INITIALIZATION_REGISTER | |
LTC_CHECK_INITIALIZATION | |
LTC_EXIT_INITIALIZATION |
Definition at line 170 of file ltc_defs.h.
Substates for the uninitialized state
Enumerator | |
---|---|
LTC_ENTRY_INITIALIZED |
Definition at line 182 of file ltc_defs.h.
Substates for the multiplexer measurement configuration state
Definition at line 333 of file ltc_defs.h.
Substates for the single GPIO multiplexer measurement state
Enumerator | |
---|---|
LTC_READ_AUXILIARY_REGISTER_A_RAUXA_MUXMEASUREMENT | |
LTC_SAVE_MUX_MEASUREMENT_MUXMEASUREMENT |
Definition at line 355 of file ltc_defs.h.
Substates for open-wire check
Definition at line 231 of file ltc_defs.h.
Substates for the all-GPIO multiplexer measurement state
Definition at line 345 of file ltc_defs.h.
Substates for the cell voltage + SC measurement state
Enumerator | |
---|---|
LTC_VOLTMEAS_SC_TRIGGER_CONVERSION | |
LTC_VOLTMEAS_SC_READ_SC | |
LTC_EXIT_VOLTMEAS_SC |
Definition at line 207 of file ltc_defs.h.
Substates for the read voltage state
Definition at line 187 of file ltc_defs.h.
enum LTC_STATEMACH_SUB_e |
General substates
Enumerator | |
---|---|
LTC_ENTRY | Substate entry state |
LTC_ERROR_ENTRY | Substate entry error |
LTC_ERROR_PROCESSED | Substate error processed |
Definition at line 158 of file ltc_defs.h.
Substates for the temperature sensor control state
Definition at line 321 of file ltc_defs.h.
Substates for the uninitialized state
Enumerator | |
---|---|
LTC_ENTRY_UNINITIALIZED | Initialize-sequence |
Definition at line 165 of file ltc_defs.h.
Substates for the user IO control state
Enumerator | |
---|---|
LTC_USER_IO_SET_OUTPUT_REGISTER | |
LTC_USER_IO_READ_INPUT_REGISTER | |
LTC_USER_IO_SEND_CLOCK_STCOMM | |
LTC_USER_IO_READ_I2C_TRANSMISSION_RESULT_RDCOMM | |
LTC_USER_IO_SAVE_DATA | |
LTC_USER_IO_FINISHED |
Definition at line 280 of file ltc_defs.h.
Substates for the user IO control state, TI port expander
Definition at line 290 of file ltc_defs.h.
enum LTC_TASK_TYPE_e |
Variable to define if the LTC should measure are restart the initialization sequence
Enumerator | |
---|---|
LTC_HAS_TO_MEASURE | measurement state of the LTC |
LTC_HAS_TO_REINIT | re-initialization state of the LTC |
LTC_HAS_TO_MEASURE_2CELLS | measurement state of the LTC |
Definition at line 413 of file ltc_defs.h.