foxBMS - Unit Tests  1.3.0
The foxBMS Unit Tests API Documentation
sbc_fs8x_communication.h File Reference

This file contains functions for SPI/I2C communication. More...

#include <stdint.h>
#include <stdbool.h>
#include "sbc_fs8x_common.h"
Include dependency graph for sbc_fs8x_communication.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define FS8x_COMM_FRAME_SIZE   (0x04U)
 

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...
 
fs8x_status_t FS8x_ReadRegister (SPI_INTERFACE_CONFIG_s *pSpiInterface, fs8x_drv_data_t *drvData, bool isFailSafe, uint8_t address, fs8x_rx_frame_t *rxData)
 Performs a read from a single FS8x register. More...
 
fs8x_status_t FS8x_WriteRegister (SPI_INTERFACE_CONFIG_s *pSpiInterface, fs8x_drv_data_t *drvData, bool isFailSafe, uint8_t address, uint16_t writeData)
 Sends write command to the FS8x. More...
 
fs8x_status_t FS8x_WriteRegisterInit (SPI_INTERFACE_CONFIG_s *pSpiInterface, fs8x_drv_data_t *drvData, uint8_t address, uint16_t writeData)
 Performs a write to a single FS8x FS init register (during the INIT_FS phase only). More...
 
fs8x_status_t FS8x_UpdateRegister (SPI_INTERFACE_CONFIG_s *pSpiInterface, fs8x_drv_data_t *drvData, bool isFailSafe, uint8_t address, int16_t mask, uint16_t writeData)
 Performs update of a single register. It affects bits specified by a bit mask. More...
 

Detailed Description

This file contains functions for SPI/I2C communication.

Author
nxf44615
Version
1.1
Date
9-Oct-2018
Updated
2020-03-18 (date of last update) Adapted driver to pass interface configuration as parameter into the functions to enable the usage of multiple ICs in the system.

Definition in file sbc_fs8x_communication.h.

Macro Definition Documentation

◆ FS8x_COMM_FRAME_SIZE

#define FS8x_COMM_FRAME_SIZE   (0x04U)

Length of the communication frame

Definition at line 60 of file sbc_fs8x_communication.h.