foxBMS - Unit Tests
1.2.1
The foxBMS Unit Tests API Documentation
|
Header for the configuration for the driver for the smart power switches. More...
Go to the source code of this file.
Data Structures | |
struct | SPS_CHANNEL_STATE |
struct | SPS_CHANNEL_FEEDBACK_MAPPING |
Typedefs | |
typedef enum SPS_WRITE_TYPE | SPS_WRITE_TYPE_e |
typedef enum SPS_READ_TYPE | SPS_READ_TYPE_e |
typedef enum SPS_CHANNEL_FUNCTION | SPS_CHANNEL_FUNCTION_e |
typedef struct SPS_CHANNEL_STATE | SPS_CHANNEL_STATE_s |
typedef struct SPS_CHANNEL_FEEDBACK_MAPPING | SPS_CHANNEL_FEEDBACK_MAPPING_s |
typedef enum SPS_STATE | SPS_STATE_e |
typedef enum SPS_ACTION | SPS_ACTION_e |
Variables | |
SPS_CHANNEL_STATE_s | sps_channelStatus [SPS_NR_OF_AVAILABLE_SPS_CHANNELS] |
const SPS_CHANNEL_FEEDBACK_MAPPING_s | sps_kChannelFeedbackMapping [SPS_NR_OF_AVAILABLE_SPS_CHANNELS] |
Header for the configuration for the driver for the smart power switches.
SPDX-License-Identifier: BSD-3-Clause
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
We kindly request you to use one or more of the following phrases to refer to foxBMS in your hardware, software, documentation or advertising materials:
Definition in file sps_cfg.h.
#define SPS_ADDRESS_BIT_START (8u) |
#define SPS_BITMASK_DIAGNOSTIC_ONDEMAND_OUTPUT_CURRENT (0x1FFFu) |
#define SPS_C_CONTROL_REGISTER_ADDRESS (0x16u) |
#define SPS_CHANNEL_ON_DEFAULT_THRESHOLD_mA (20.0f) |
#define SPS_DIAG_CTRL_BIT_POSITION (7u) |
#define SPS_DRIVE_STRENGTH_BIT_START (5u) |
#define SPS_EN_IRQ_PIN_DIAG_REGISTER_ADDRESS (0x11u) |
#define SPS_EN_WARN_PIN_DIAG_REGISTER_ADDRESS (0x13u) |
#define SPS_FEEDBACK_GIO_PORT (hetREG2->DOUT) |
#define SPS_FEEDBACK_GIO_PORT_DIR (hetREG2->DIR) |
#define SPS_FEEDBACK_PIN (9u) |
#define SPS_GLOBAL_CONTROL_REGISTER_ADDRESS (0x00u) |
#define SPS_I_MEASUREMENT_LSB_mA (0.98f) |
#define SPS_MEDIUM_DRIVE (0x01u) |
#define SPS_MODE_BIT_START (6u) |
bitshift for the mode bit in the SPS
used for bitshifting SPS_NORMAL_MODE to the right position
#define SPS_NORMAL_MODE (0x01u) |
#define SPS_NR_CONTACTOR_PER_IC (4u) |
#define SPS_NR_OF_AVAILABLE_SPS_CHANNELS (SPS_NR_CONTACTOR_PER_IC * SPS_NR_OF_IC) |
#define SPS_NR_OF_IC (2u) |
#define SPS_NR_OF_REQUIRED_CONTACTOR_CHANNELS (BS_NR_OF_CONTACTORS) |
#define SPS_OD_IOUT1_DIAG_REGISTER_ADDRESS (0x08u) |
#define SPS_OD_IOUT2_DIAG_REGISTER_ADDRESS (0x09u) |
#define SPS_OD_IOUT3_DIAG_REGISTER_ADDRESS (0x0Au) |
#define SPS_OD_IOUT4_DIAG_REGISTER_ADDRESS (0x0Bu) |
#define SPS_OUTPUT_CONTROL_REGISTER_ADDRESS (0x02u) |
#define SPS_RESET_GIO_PORT (hetREG2->DOUT) |
#define SPS_RESET_GIO_PORT_DIR (hetREG2->DIR) |
#define SPS_RESET_PIN (16u) |
#define SPS_RW_BIT_POSITION (15u) |
#define SPS_RW_WRITE (1u) |
#define SPS_SPI_BUFFERSIZE SPS_NR_OF_IC |
#define SPS_STRONG_DRIVE (0x00u) |
typedef enum SPS_ACTION SPS_ACTION_e |
Actions to do for the Smart Power Switch IC
typedef struct SPS_CHANNEL_FEEDBACK_MAPPING SPS_CHANNEL_FEEDBACK_MAPPING_s |
SPS channel mapping to feedback pin
typedef enum SPS_CHANNEL_FUNCTION SPS_CHANNEL_FUNCTION_e |
functional state of a SPS channel
typedef struct SPS_CHANNEL_STATE SPS_CHANNEL_STATE_s |
SPS channel state
typedef enum SPS_READ_TYPE SPS_READ_TYPE_e |
sps read types
typedef enum SPS_STATE SPS_STATE_e |
State for the CONT handling
typedef enum SPS_WRITE_TYPE SPS_WRITE_TYPE_e |
spi block identification numbers
enum SPS_ACTION |
Actions to do for the Smart Power Switch IC
enum SPS_CHANNEL_FUNCTION |
enum SPS_READ_TYPE |
enum SPS_STATE |
enum SPS_WRITE_TYPE |
|
extern |
|
extern |
mapping of channel states to feedback pins