foxBMS-UnitTests
1.0.0
The foxBMS Unit Tests API Documentation
|
Headers for the driver for the smart power switches. More...
Go to the source code of this file.
Functions | |
void | SPS_Initialize (void) |
Initialize IOs for the SPS driver. More... | |
void | SPS_Ctrl (void) |
Control function for the CONT driver state machine. More... | |
void | SPS_RequestContactorState (SPS_CHANNEL_INDEX channelIndex, SPS_CHANNEL_FUNCTION_e channelFunction) |
Request state of a contactor. More... | |
void | SPS_RequestGeneralIOState (SPS_CHANNEL_INDEX channelIndex, SPS_CHANNEL_FUNCTION_e channelFunction) |
Request state of a general IO. More... | |
CONT_ELECTRICAL_STATE_TYPE_e | SPS_GetChannelFeedback (SPS_CHANNEL_INDEX channelIndex) |
Get feedback value. More... | |
SPS_CHANNEL_AFFILIATION_e | SPS_GetChannelAffiliation (SPS_CHANNEL_INDEX channelIndex) |
Returns the channel affiliation. More... | |
void | TEST_SPS_RequestChannelState (SPS_CHANNEL_INDEX channelIndex, SPS_CHANNEL_FUNCTION_e channelFunction) |
SPS_STATE_e | TEST_SPS_GetSpsState (void) |
void | TEST_SPS_SetSpsState (const SPS_STATE_e newState) |
uint8_t | TEST_SPS_GetSpsTimer (void) |
void | TEST_SPS_SetSpsTimer (const uint8_t newTimer) |
Headers for the driver for the smart power switches.
BSD 3-Clause License 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:
″This product uses parts of foxBMS®″
″This product includes parts of foxBMS®″
″This product is derived from foxBMS®″
Definition in file sps.h.
void SPS_Ctrl | ( | void | ) |
Control function for the CONT driver state machine.
This function contains the sequence of events in the SPS state machine. It must be called time-triggered, every 10ms. It exits without effect, if the function call is a reentrance.
Definition at line 467 of file sps.c.
SPS_CHANNEL_AFFILIATION_e SPS_GetChannelAffiliation | ( | SPS_CHANNEL_INDEX | channelIndex | ) |
CONT_ELECTRICAL_STATE_TYPE_e SPS_GetChannelFeedback | ( | SPS_CHANNEL_INDEX | channelIndex | ) |
Get feedback value.
This function compares the measured current in the contactor channel with a fixed threshold and assumes the contactor feedback to be closed when this threshold is passed on the channel.
[in] | channelIndex | index of the channel (contactor) that should be accessed |
Definition at line 598 of file sps.c.
void SPS_Initialize | ( | void | ) |
void SPS_RequestContactorState | ( | SPS_CHANNEL_INDEX | channelIndex, |
SPS_CHANNEL_FUNCTION_e | channelFunction | ||
) |
Request state of a contactor.
This function checks if the requested channel is affiliated to contactors and then passes the arguments on to SPS_RequestChannelState().
[in] | channelIndex | number of the channel that should be accessed; This has to be a SPS channel and it has to be affiliated with SPS_AFF_CONTACTOR |
[in] | channelFunction | requested functional state of the channel |
Definition at line 588 of file sps.c.
void SPS_RequestGeneralIOState | ( | SPS_CHANNEL_INDEX | channelIndex, |
SPS_CHANNEL_FUNCTION_e | channelFunction | ||
) |
Request state of a general IO.
This function checks if the requested channel is affiliated to general IO and then passes the arguments on to SPS_RequestChannelState().
[in] | channelIndex | number of the channel that should be accessed; This has to be a SPS channel and it has to be affiliated with SPS_AFF_GENERAL_IO |
[in] | channelFunction | requested functional state of the channel |
Definition at line 593 of file sps.c.
SPS_STATE_e TEST_SPS_GetSpsState | ( | void | ) |
void TEST_SPS_RequestChannelState | ( | SPS_CHANNEL_INDEX | channelIndex, |
SPS_CHANNEL_FUNCTION_e | channelFunction | ||
) |
void TEST_SPS_SetSpsState | ( | const SPS_STATE_e | newState | ) |