![]() |
The foxBMS secondary mcu API documentation
|
Headers for the driver for the LTC monitoring chip. More...
#include "ltc_cfg.h"
Go to the source code of this file.
Data Structures | |
struct | LTC_ERRORTABLE_s |
Functions | |
void | LTC_Trigger (void) |
trigger function for the LTC driver state machine. More... | |
LTC_RETURN_TYPE_e | LTC_SetStateRequest (LTC_STATE_REQUEST_e statereq) |
sets the current state request of the state variable ltc_state. More... | |
void | LTC_SetFirstMeasurementCycleFinished (void) |
sets the measurement initialization status. More... | |
uint8_t | LTC_IsFirstMeasurementCycleFinished (void) |
gets the measurement initialization status. More... | |
STD_RETURN_TYPE_e | LTC_GetMuxSequenceState (void) |
gets the measurement initialization status. More... | |
void | LTC_SaveAllGPIOs (void) |
void | LTC_SaveVoltages (void) |
stores the measured voltages in the database. More... | |
void | LTC_SaveTemperatures (void) |
stores the measured temperatures and the measured multiplexer feedbacks in the database. More... | |
void | LTC_SaveAllGPIOMeasurement (void) |
stores the measured GPIOs in the database. More... | |
LTC_STATE_REQUEST_e | LTC_GetStateRequest (void) |
gets the current state request. More... | |
LTC_STATEMACH_e | LTC_GetState (void) |
gets the current state. More... | |
Headers for the driver for the LTC monitoring chip.
BSD 3-Clause License 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:
″This product uses parts of foxBMS®″
″This product includes parts of foxBMS®″
″This product is derived from foxBMS®″
STD_RETURN_TYPE_e LTC_GetMuxSequenceState | ( | void | ) |
gets the measurement initialization status.
LTC_STATEMACH_e LTC_GetState | ( | void | ) |
gets the current state.
This function is used in the functioning of the LTC state machine.
LTC_STATE_REQUEST_e LTC_GetStateRequest | ( | void | ) |
gets the current state request.
This function is used in the functioning of the LTC state machine.
uint8_t LTC_IsFirstMeasurementCycleFinished | ( | void | ) |
gets the measurement initialization status.
void LTC_SaveAllGPIOMeasurement | ( | void | ) |
stores the measured GPIOs in the database.
This function loops through the data of all modules in the LTC daisy-chain that are stored in the ltc_allgpiovoltage buffer and writes them in the database. At each write iteration, the variable named "state" and related to voltages in the database is incremented.
void LTC_SaveAllGPIOs | ( | void | ) |
void LTC_SaveTemperatures | ( | void | ) |
stores the measured temperatures and the measured multiplexer feedbacks in the database.
This function loops through the temperature and multiplexer feedback data of all modules in the LTC daisy-chain that are stored in the LTC_MultiplexerVoltages buffer and writes them in the database. At each write iteration, the variables named "state" and related to temperatures and multiplexer feedbacks in the database are incremented.
void LTC_SaveVoltages | ( | void | ) |
stores the measured voltages in the database.
This function loops through the data of all modules in the LTC daisy-chain that are stored in the LTC_CellVoltages buffer and writes them in the database. At each write iteration, the variable named "state" and related to voltages in the database is incremented.
void LTC_SetFirstMeasurementCycleFinished | ( | void | ) |
sets the measurement initialization status.
LTC_RETURN_TYPE_e LTC_SetStateRequest | ( | LTC_STATE_REQUEST_e | statereq | ) |
sets the current state request of the state variable ltc_state.
This function is used to make a state request to the state machine,e.g, start voltage measurement, read result of voltage measurement, re-initialization It calls LTC_CheckStateRequest() to check if the request is valid. The state request is rejected if is not valid. The result of the check is returned immediately, so that the requester can act in case it made a non-valid state request.
statereq | state request to set |
adcModereq | LTC ADCmeasurement mode (fast, normal or filtered) |
adcMeasChreq | number of channels measured for GPIOS (one at a time for multiplexers or all five GPIOs) |
numberOfMeasuredMux | number of multiplexer inputs measured between two cell voltage measurements |
void LTC_Trigger | ( | void | ) |
trigger function for the LTC driver state machine.
This function contains the sequence of events in the LTC state machine. It must be called time-triggered, every 1ms.