foxBMS - Unit Tests
1.2.1
The foxBMS Unit Tests API Documentation
|
Driver common structures, enums, macros and configuration values. More...
Go to the source code of this file.
Data Structures | |
struct | fs8x_tx_frame_t |
Structure representing transmit data frame. More... | |
struct | fs8x_rx_frame_t |
Structure representing received data frame. More... | |
struct | fs8x_drv_data_t |
This data structure is used by the FS8x driver (this is the first parameter of most the FS8x functions). It contains a configuration of the FS8x device. More... | |
Macros | |
#define | FS8x_WD_DISABLE 0 |
#define | FS8x_WD_SIMPLE 1 |
#define | FS8x_WD_CHALLENGER 2 |
#define | FS8x_WD_TYPE FS8x_WD_SIMPLE |
Define Watchdog type (see Watchdog types). More... | |
#define | FS8x_COMM_SPI 0 |
#define | FS8x_COMM_I2C 1 |
#define | FS8x_COMM_BOTH 2 |
#define | FS8x_COMM_TYPE FS8x_COMM_SPI |
Define communication type (see Allowed communication types). More... | |
Bitwise operations used by this driver. | |
#define | FS8x_BO_SETVAL(data, val, mask) (((data) & ~(mask)) | (val)) |
This macro updates value of bits specified by the mask. It is assumed that value is already shifted. More... | |
#define | FS8x_BO_SETVAL_EXT(data, value, mask, shift) (((data) & ~(mask << shift)) | (((value) & (mask)) << (shift))) |
This macro updates value of bits specified by the mask. Additionally range check on the value is performed. It is assumed that value is not shifted. More... | |
#define | FS8x_BO_GETVAL(data, mask, shift) ((data) & (mask) << (shift)) |
This macro returns value specified by the mask. More... | |
#define | FS8x_BO_GET_REG_VALUE(value, mask, shift) (((value) & (mask)) >> (shift)) |
Macro for getting value from register. More... | |
Enumerations | |
enum | fs8x_status_t { fs8xStatusOk = 0U , fs8xStatusError = 1U } |
Status return codes. More... | |
enum | fs8x_commType_t { fs8xSPI = 0 , fs8xI2C = 1 } |
Actually selected communication type (SPI or I2C). More... | |
enum | fs8x_command_type_t { fs8xRegRead , fs8xRegWrite } |
Command type. More... | |
Driver common structures, enums, macros and configuration values.
This header file contains settings for following driver functionalities:
Definition in file sbc_fs8x_common.h.
#define FS8x_BO_GET_REG_VALUE | ( | value, | |
mask, | |||
shift | |||
) | (((value) & (mask)) >> (shift)) |
Macro for getting value from register.
value | Value read from register. |
mask | Bit selection. |
shift | Bit shift. |
Definition at line 188 of file sbc_fs8x_common.h.
#define FS8x_BO_GETVAL | ( | data, | |
mask, | |||
shift | |||
) | ((data) & (mask) << (shift)) |
This macro returns value specified by the mask.
Definition at line 180 of file sbc_fs8x_common.h.
#define FS8x_BO_SETVAL | ( | data, | |
val, | |||
mask | |||
) | (((data) & ~(mask)) | (val)) |
This macro updates value of bits specified by the mask. It is assumed that value is already shifted.
Definition at line 172 of file sbc_fs8x_common.h.
#define FS8x_BO_SETVAL_EXT | ( | data, | |
value, | |||
mask, | |||
shift | |||
) | (((data) & ~(mask << shift)) | (((value) & (mask)) << (shift))) |
This macro updates value of bits specified by the mask. Additionally range check on the value is performed. It is assumed that value is not shifted.
Definition at line 176 of file sbc_fs8x_common.h.
#define FS8x_COMM_TYPE FS8x_COMM_SPI |
Define communication type (see Allowed communication types).
Definition at line 86 of file sbc_fs8x_common.h.
#define FS8x_WD_TYPE FS8x_WD_SIMPLE |
Define Watchdog type (see Watchdog types).
Definition at line 73 of file sbc_fs8x_common.h.