foxBMS
1.1.0
The foxBMS Battery Management System API Documentation
|
Headers for the driver for the interlock. More...
#include "interlock_cfg.h"
Go to the source code of this file.
Data Structures | |
struct | ILCK_STATE_s |
Functions | |
STD_RETURN_TYPE_e | ILCK_Init (void) |
Checks the configuration of the interlock-module. More... | |
ILCK_ELECTRICAL_STATE_TYPE_e | ILCK_GetInterlockFeedback (void) |
Reads the feedback pin of the interlock and returns its current value (ILCK_SWITCH_OFF/ILCK_SWITCH_ON) More... | |
ILCK_RETURN_TYPE_e | ILCK_SetStateRequest (ILCK_STATE_REQUEST_e statereq) |
sets the current state request of the state variable ilck_state. More... | |
ILCK_STATEMACH_e | ILCK_GetState (void) |
gets the current state. More... | |
void | ILCK_Trigger (void) |
trigger function for the ILCK driver state machine. More... | |
Headers for the driver for the interlock.
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 interlock.h.
enum ILCK_RETURN_TYPE_e |
Possible return values when state requests are made to the ILCK statemachine
Definition at line 98 of file interlock.h.
enum ILCK_STATE_REQUEST_e |
State requests for the ILCK statemachine
Enumerator | |
---|---|
ILCK_STATE_INIT_REQUEST | |
ILCK_STATE_OPEN_REQUEST | |
ILCK_STATE_CLOSE_REQUEST | |
ILCK_STATE_ERROR_REQUEST | |
ILCK_STATE_NO_REQUEST |
Definition at line 87 of file interlock.h.
enum ILCK_STATEMACH_e |
States of the ILCK state machine
Definition at line 65 of file interlock.h.
enum ILCK_STATEMACH_SUB_e |
Substates of the ILCK state machine
Enumerator | |
---|---|
ILCK_ENTRY | Substate entry state |
Definition at line 80 of file interlock.h.
ILCK_ELECTRICAL_STATE_TYPE_e ILCK_GetInterlockFeedback | ( | void | ) |
Reads the feedback pin of the interlock and returns its current value (ILCK_SWITCH_OFF/ILCK_SWITCH_ON)
Definition at line 287 of file interlock.c.
ILCK_STATEMACH_e ILCK_GetState | ( | void | ) |
gets the current state.
This function is used in the functioning of the ILCK state machine.
Definition at line 302 of file interlock.c.
STD_RETURN_TYPE_e ILCK_Init | ( | void | ) |
Checks the configuration of the interlock-module.
ILCK_RETURN_TYPE_e ILCK_SetStateRequest | ( | ILCK_STATE_REQUEST_e | statereq | ) |
sets the current state request of the state variable ilck_state.
This function is used to make a state request to the state machine,e.g, start voltage measurement, read result of voltage measurement, re-initialization It calls ILCK_CheckStateRequest() to check if the request is valid. The state request is rejected if is not valid. The result of the check is returned immediately, so that the requester can act in case it made a non-valid state request.
statereq | state request to set |
Definition at line 306 of file interlock.c.
void ILCK_Trigger | ( | void | ) |
trigger function for the ILCK driver state machine.
This function contains the sequence of events in the ILCK state machine. It must be called time-triggered, every 1ms.
Definition at line 320 of file interlock.c.