|
foxBMS
1.0.0
The foxBMS Battery Management System API Documentation
|
Go to the documentation of this file.
48 #ifndef SBC_FS8X_COMMON_H_
49 #define SBC_FS8X_COMMON_H_
67 #define FS8x_WD_DISABLE 0
68 #define FS8x_WD_SIMPLE 1
69 #define FS8x_WD_CHALLENGER 2
73 #define FS8x_WD_TYPE FS8x_WD_SIMPLE
80 #define FS8x_COMM_SPI 0
81 #define FS8x_COMM_I2C 1
82 #define FS8x_COMM_BOTH 2
86 #define FS8x_COMM_TYPE FS8x_COMM_SPI
172 #define FS8x_BO_SETVAL(data, val, mask) (((data) & ~(mask)) | (val))
176 #define FS8x_BO_SETVAL_EXT(data, value, mask, shift) \
177 (((data) & ~(mask << shift)) | (((value) & (mask)) << (shift)))
180 #define FS8x_BO_GETVAL(data, mask, shift) ((data) & (mask) << (shift))
188 #define FS8x_BO_GET_REG_VALUE(value, mask, shift) (((value) & (mask)) >> (shift))
fs8x_commType_t
Actually selected communication type (SPI or I2C).
Structure representing transmit data frame.
Headers for the driver for the SPI module.
Structure representing received data frame.
fs8x_status_t
Status return codes.
This data structure is used by the FS8x driver (this is the first parameter of most the FS8x function...
uint8_t i2cAddressOtp
SBC I2C address.
fs8x_command_type_t
Command type.
fs8x_command_type_t commandType
Command type (R/W).
uint16_t watchdogSeed
Actual watchdog seed value. See FS8x_WD_ChangeSeed() for details.
uint8_t registerAddress
Register address.
uint16_t writeData
Data to be written to the register.
uint16_t readData
Content of a read register.
bool isFailSafe
Main/Fail Safe register selection.
uint8_t deviceStatus
A device status is returned into this byte after a successful transfer.
fs8x_commType_t communicationMode
Actual communication mode (SPI or I2C). See fs8x_commType_t for details.