58 #ifndef FOXBMS__MXM_17841B_H_
59 #define FOXBMS__MXM_17841B_H_
79 #define MXM_SPI_TX_BUFFER_LENGTH (10u)
82 #define MXM_SPI_RX_BUFFER_LENGTH (100u)
297 uint8_t payloadLength,
298 uint8_t extendMessageBytes,
300 uint16_t rxBufferLength,
312 #ifdef UNITY_UNIT_TEST
Definition of foxBMS standard types.
STD_RETURN_TYPE_e MXM_41BSetStateRequest(MXM_41B_INSTANCE_s *pInstance, MXM_STATEMACH_41B_e state, uint16_t *pPayload, uint8_t payloadLength, uint8_t extendMessageBytes, uint16_t *pRxBuffer, uint16_t rxBufferLength, MXM_41B_STATE_REQUEST_STATUS_e *processed)
Set state transition for MAX17841B-state-machine.
void MXM_41BStateMachine(MXM_41B_INSTANCE_s *pInstance)
Execute state-machine for the MAX17841B.
#define MXM_SPI_TX_BUFFER_LENGTH
SPI TX buffer length.
STD_RETURN_TYPE_e MXM_41BWriteRegisterFunction(MXM_41B_INSTANCE_s *pInstance, MXM_41B_REG_FUNCTION_e registerFunction, MXM_41B_REG_BIT_VALUE value)
Write a register function.
MXM_STATEMACH_41B_e
States of the MAX17841B state-machine.
@ MXM_STATEMACH_41B_MAXSTATE
@ MXM_STATEMACH_41B_GET_VERSION
@ MXM_STATEMACH_41B_CLEAR_RECEIVE_BUFFER
@ MXM_STATEMACH_41B_CLEAR_TRANSMIT_BUFFER
@ MXM_STATEMACH_41B_UNINITIALIZED
@ MXM_STATEMACH_41B_WRITE_CONF_AND_INT_REGISTER
@ MXM_STATEMACH_41B_CHECK_FMEA
@ MXM_STATEMACH_41B_READ_STATUS_REGISTER
@ MXM_STATEMACH_41B_UART_TRANSACTION
MXM_41B_SUBSTATES_e
Substates of the MAX17841B state-machine.
@ MXM_41B_FMEA_REQUEST_REGISTER
@ MXM_41B_INIT_RESET_BRIDGE_IC
@ MXM_41B_UART_WAIT_FOR_RX_STATUS_CHANGE_WRITE
@ MXM_41B_UART_READ_RX_SPACE
@ MXM_41B_INIT_CHECK_INITIALIZATION
@ MXM_41B_UART_READ_BACK_RECEIVE_BUFFER_SAVE
@ MXM_41B_VERSION_REQUEST_REGISTER
@ MXM_41B_UART_WRITE_LOAD_QUEUE
@ MXM_41B_UART_READ_LOAD_QUEUE
@ MXM_41B_INIT_START_BRIDGE_IC
@ MXM_41B_UART_READ_RX_SPACE_PARSE
@ MXM_41B_INIT_READ_CONFIG_REGISTERS
@ MXM_41B_UART_VERIFY_LOAD_QUEUE_AND_TRANSMIT
@ MXM_41B_READ_STATUS_REGISTER_SEND
@ MXM_41B_READ_STATUS_REGISTER_PROCESS
@ MXM_41B_INIT_WRITE_DEFAULT_VALUES
@ MXM_41B_UART_WAIT_FOR_RX_STATUS_CHANGE_READ_AND_READ_BACK_RCV_BUF
#define MXM_SPI_RX_BUFFER_LENGTH
void MXM_41BInitializeStateStruct(MXM_41B_INSTANCE_s *pInstance)
Initializes the state struct with default values.
STD_RETURN_TYPE_e MXM_41BReadRegisterFunction(const MXM_41B_INSTANCE_s *const kpkInstance, MXM_41B_REG_FUNCTION_e registerFunction, MXM_41B_REG_BIT_VALUE *pValue)
Read the value of a register function.
MXM_41B_REG_FUNCTION_e
Register functions.
@ MXM_41B_REG_FUNCTION_RX_BUSY_STATUS
@ MXM_41B_REG_FUNCTION_RX_EMPTY_STATUS
@ MXM_41B_REG_FUNCTION_RX_STOP_STATUS
@ MXM_41B_REG_FUNCTION_RX_OVERFLOW_STATUS
@ MXM_41B_REG_FUNCTION_TX_PREAMBLES
@ MXM_41B_REG_FUNCTION_RX_ERROR_INT
@ MXM_41B_REG_FUNCTION_KEEP_ALIVE
@ MXM_41B_REG_FUNCTION_RX_OVERFLOW_INT
MXM_41B_STATE_REQUEST_STATUS_e
Request status of MAX17841B states.
@ MXM_41B_STATE_UNPROCESSED
@ MXM_41B_STATE_PROCESSED
Header for the configuration for the Maxim analog front-end.
Struct for the state-variable of state-machine.
MXM_41B_STATE_REQUEST_STATUS_e * processed
uint32_t shutdownTimeStamp
MXM_41B_SUBSTATES_e substate
MXM_STATEMACH_41B_e state
uint8_t extendMessageBytes