foxBMS - Unit Tests
1.4.1
The foxBMS Unit Tests 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 104 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 93 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 397 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 364 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 253 of file ltc_defs.h.
Substates for the balance control state
Definition at line 216 of file ltc_defs.h.
Substates for diagnosis state
Definition at line 242 of file ltc_defs.h.
Substates for digital filter check
Definition at line 263 of file ltc_defs.h.
enum LTC_STATEMACH_e |
States of the LTC state machine
Definition at line 118 of file ltc_defs.h.
Substates for the EEPROM control state
Definition at line 307 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 172 of file ltc_defs.h.
Substates for the uninitialized state
Enumerator | |
---|---|
LTC_ENTRY_INITIALIZED |
Definition at line 184 of file ltc_defs.h.
Substates for the multiplexer measurement configuration state
Definition at line 335 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 357 of file ltc_defs.h.
Substates for open-wire check
Definition at line 233 of file ltc_defs.h.
Substates for the all-GPIO multiplexer measurement state
Definition at line 347 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 209 of file ltc_defs.h.
Substates for the read voltage state
Definition at line 189 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 160 of file ltc_defs.h.
Substates for the temperature sensor control state
Definition at line 323 of file ltc_defs.h.
Substates for the uninitialized state
Enumerator | |
---|---|
LTC_ENTRY_UNINITIALIZED | Initialize-sequence |
Definition at line 167 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 282 of file ltc_defs.h.
Substates for the user IO control state, TI port expander
Definition at line 292 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 415 of file ltc_defs.h.