foxBMS  1.0.0
The foxBMS Battery Management System API Documentation
MCU specific functions

Functions in this group must be implemented by the user. More...

Functions

fs8x_status_t MCU_SPI_TransferData (SPI_INTERFACE_CONFIG_s *pSpiInterface, uint8_t *txFrame, uint16_t frameLengthBytes, uint8_t *rxFrame)
 This function transfers single frame through blocking SPI communication in both directions. MCU specific. More...
 

Detailed Description

Functions in this group must be implemented by the user.

Function Documentation

◆ MCU_SPI_TransferData()

fs8x_status_t MCU_SPI_TransferData ( SPI_INTERFACE_CONFIG_s pSpiInterface,
uint8_t *  txFrame,
uint16_t  frameLengthBytes,
uint8_t *  rxFrame 
)

This function transfers single frame through blocking SPI communication in both directions. MCU specific.

This function must be implemented if SPI communication is used. The txFrame must be sent to the SPI bus from the last byte to the first (e.g. txFrame[0] will be sent last). The FS8x driver expects incoming data in reversed order, e.g. rxFrame[0] = CRC, rxFrame[1] = LSB ...

Warning
This function must be implemented as blocking as there is not synchronization mechanism implemented in the driver.
Parameters
[in,out]pSpiInterfaceSPI communication interface config
[in]txFrameFrame to be send.
[in]frameLengthBytesBytes Length of the frame in bytes.
[out]rxFrameReceived frame.
Returns
Status return code.

Definition at line 941 of file nxpfs85xx.c.

Here is the call graph for this function: