145 static int8_t mxm_numberOfInstances = 0;
149 mxm_numberOfInstances++;
165 mxm_numberOfInstances--;
219 return firstMeasurementDone;
@ DATA_BLOCK_ID_BALANCING_CONTROL
@ DATA_BLOCK_ID_CELL_TEMPERATURE_BASE
@ DATA_BLOCK_ID_OPEN_WIRE_BASE
@ DATA_BLOCK_ID_CELL_VOLTAGE_BASE
#define FAS_ASSERT(x)
Assertion macro that asserts that x is true.
enum STD_RETURN_TYPE STD_RETURN_TYPE_e
General macros and definitions for the whole platform.
void MXM_41BStateMachine(MXM_41B_INSTANCE_s *pInstance)
Execute state-machine for the MAX17841B.
void MXM_41BInitializeStateStruct(MXM_41B_INSTANCE_s *pInstance)
Initializes the state struct with default values.
Headers for the driver for the MAX17841B ASCI and MAX1785x monitoring chip.
void MXM_CheckIfErrorCounterCanBeReset(MXM_MONITORING_INSTANCE_s *pInstance)
Function that checks if the error counter can be reset.
void MXM_StateMachine(MXM_MONITORING_INSTANCE_s *pInstance)
Main state-machine implementation.
void MXM_InitializeStateStruct(MXM_BALANCING_STATE_s *pBalancingInstance, MXM_MONITORING_INSTANCE_s *pMonitoringInstance)
Initializes the state structs with default values.
Headers for the driver for the MAX17841B ASCI and MAX1785x monitoring chip.
static void MXM_Tick(void)
Tick function.
STD_RETURN_TYPE_e AFE_RequestEepromRead(uint8_t string)
Makes the request to the AFE state machine to read from the external EEPROM on slaves.
STD_RETURN_TYPE_e AFE_RequestEepromWrite(uint8_t string)
Makes the request to the AFE state machine to write to the external EEPROM on slaves.
static DATA_BLOCK_CELL_VOLTAGE_s mxm_tableCellVoltages
Local cell voltage data block.
STD_RETURN_TYPE_e AFE_RequestIoRead(uint8_t string)
Makes the request to the AFE state machine to read from the IO port-expander.
STD_RETURN_TYPE_e AFE_TriggerIc(void)
STD_RETURN_TYPE_e AFE_RequestOpenWireCheck(uint8_t string)
Makes the request to the AFE state machine to perform open-wire check.
bool AFE_IsFirstMeasurementCycleFinished(void)
Checks if the first AFE measurement cycle was made.
STD_RETURN_TYPE_e AFE_RequestBalancingFeedbackRead(uint8_t string)
Makes the request to the AFE state machine to read balancing feedback from the slaves.
static DATA_BLOCK_BALANCING_CONTROL_s mxm_tableBalancingControl
Balancing control.
STD_RETURN_TYPE_e AFE_RequestTemperatureRead(uint8_t string)
Makes the request to the AFE state machine to read from the external temperature sensor on slaves.
static MXM_5X_INSTANCE_s mxm_5xState
static MXM_41B_INSTANCE_s mxm_41bState
static MXM_BALANCING_STATE_s mxm_balancingState
STD_RETURN_TYPE_e AFE_RequestIoWrite(uint8_t string)
Makes the request to the AFE state machine to write to the IO port-expander.
static void MXM_SetStateStructDefaultValues(void)
Initialize the state structs.
STD_RETURN_TYPE_e AFE_Initialize(void)
static DATA_BLOCK_CELL_TEMPERATURE_s mxm_tableCellTemperatures
Local cell temperature data block.
STD_RETURN_TYPE_e AFE_StartMeasurement(void)
Makes the initialization request to the AFE state machine.
static DATA_BLOCK_OPEN_WIRE_s mxm_tableOpenWire
Local data structure for openwire results.
static MXM_MONITORING_INSTANCE_s mxm_state
void MXM_5X_InitializeStateStruct(MXM_5X_INSTANCE_s *pInstance)
Initializes the state struct with default values.
void MXM_5XStateMachine(MXM_41B_INSTANCE_s *pInstance41b, MXM_5X_INSTANCE_s *pInstance5x)
Execute state-machine for Battery Management Protocol.
Headers for the driver for the MAX17841B ASCI and MAX1785x monitoring chip.
void MXM_InitializeMonitoringPins(void)
Initialize the pins connected to the MAX17841B.
Declaration of the OS wrapper interface.
void OS_ExitTaskCritical(void)
Exit Critical interface function for use in FreeRTOS-Tasks and FreeRTOS-ISR.
void OS_EnterTaskCritical(void)
Enter Critical interface function for use in FreeRTOS-Tasks and FreeRTOS-ISR.
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
DATA_BLOCK_HEADER_s header
Struct for the state-variable of state-machine.
5x statemachine structure
DATA_BLOCK_BALANCING_CONTROL_s *const pBalancingControl_table
MXM_41B_INSTANCE_s *const pInstance41B
MXM_BALANCING_STATE_s *const pBalancingState
bool firstMeasurementDone
MXM_5X_INSTANCE_s *const pInstance5X