foxBMS  1.1.1
The foxBMS Battery Management System API Documentation
sbc_fs8x.c File Reference

Driver functions for the FS8x SBC. More...

#include <stddef.h>
#include "sbc_fs8x.h"
#include "sbc_fs8x_map.h"
#include "sbc_fs8x_assert.h"
#include "sbc_fs8x_communication.h"
#include "sbc_fs8x_common.h"
Include dependency graph for sbc_fs8x.c:

Go to the source code of this file.

Macros

#define FS8x_IS_IN_RANGE(val, min, max)   (((val) >= (min)) && ((val) <= (max)))
 Returns true if value VAL is in the range defined by MIN and MAX values (range includes the border values). More...
 

Functions

fs8x_status_t FS8x_WD_ChangeSeed (SPI_INTERFACE_CONFIG_s *spiInterface, fs8x_drv_data_t *drvData, uint16_t wdSeed)
 Changes seed of LFSR used for watchdog. More...
 
fs8x_status_t FS8x_WD_Refresh (SPI_INTERFACE_CONFIG_s *spiInterface, fs8x_drv_data_t *drvData)
 Performs the watchdog refresh. More...
 
fs8x_status_t FS8x_FS0B_Release (SPI_INTERFACE_CONFIG_s *spiInterface, fs8x_drv_data_t *drvData)
 FS0B release routine. More...
 
fs8x_status_t FS8x_SwitchAMUXchannel (SPI_INTERFACE_CONFIG_s *spiInterface, fs8x_drv_data_t *drvData, fs8x_amux_selection_t channelSelection)
 Switches a desired channel to the AMUX pin. More...
 
fs8x_status_t FS8x_SetRegulatorState (SPI_INTERFACE_CONFIG_s *spiInterface, fs8x_drv_data_t *drvData, fs8x_reg_output_t vreg, bool enable)
 Sets state (enable/disable) of the selected voltage regulator. More...
 
fs8x_status_t FS8x_GetFaultErrorCounterValue (SPI_INTERFACE_CONFIG_s *spiInterface, fs8x_drv_data_t *drvData, uint8_t *faultErrorCounterValue)
 Reads actual Fault Error Counter value. More...
 

Detailed Description

Driver functions for the FS8x SBC.

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.c.

Macro Definition Documentation

◆ FS8x_IS_IN_RANGE

#define FS8x_IS_IN_RANGE (   val,
  min,
  max 
)    (((val) >= (min)) && ((val) <= (max)))

Returns true if value VAL is in the range defined by MIN and MAX values (range includes the border values).

Parameters
valComparison value.
minMinimal value of the range.
maxMaximal value of the range.
Returns
True if value is the range. False otherwise.

Definition at line 66 of file sbc_fs8x.c.