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_command_type_t
Command type.
fs8x_commType_t
Actually selected communication type (SPI or I2C).
fs8x_status_t
Status return codes.
Headers for the driver for the SPI module.
This data structure is used by the FS8x driver (this is the first parameter of most the FS8x function...
fs8x_commType_t communicationMode
Actual communication mode (SPI or I2C). See fs8x_commType_t for details.
uint8_t i2cAddressOtp
SBC I2C address.
uint16_t watchdogSeed
Actual watchdog seed value. See FS8x_WD_ChangeSeed() for details.
Structure representing received data frame.
uint16_t readData
Content of a read register.
uint8_t deviceStatus
A device status is returned into this byte after a successful transfer.
Structure representing transmit data frame.
fs8x_command_type_t commandType
Command type (R/W).
uint8_t registerAddress
Register address.
bool isFailSafe
Main/Fail Safe register selection.
uint16_t writeData
Data to be written to the register.