foxBMS
1.1.0
The foxBMS Battery Management System API Documentation
|
Header for the configuration for the driver for the interlock. More...
Go to the source code of this file.
Data Structures | |
struct | ILCK_ELECTRICAL_STATE |
struct | ILCK_CONFIG |
Macros | |
#define | ILCK_IO_REG (gioPORTA) |
#define | ILCK_INTERLOCK_CONTROL (6U) |
#define | ILCK_INTERLOCK_FEEDBACK (0U) |
#define | ILCK_TASK_CYCLE_CONTEXT_MS (10) |
#define | ILCK_STATEMACH_SHORTTIME_MS (ILCK_TASK_CYCLE_CONTEXT_MS) |
Typedefs | |
typedef enum ILCK_ELECTRICAL_STATE_TYPE | ILCK_ELECTRICAL_STATE_TYPE_e |
typedef enum ILCK_FEEDBACK_TYPE | ILCK_FEEDBACK_TYPE_e |
typedef struct ILCK_ELECTRICAL_STATE | ILCK_ELECTRICAL_STATE_s |
typedef struct ILCK_CONFIG | ILCK_CONFIG_s |
Enumerations | |
enum | ILCK_ELECTRICAL_STATE_TYPE { ILCK_SWITCH_OFF , ILCK_SWITCH_ON , ILCK_SWITCH_UNDEF } |
enum | ILCK_FEEDBACK_TYPE { ILCK_FEEDBACK_NORMALLY_OPEN , ILCK_FEEDBACK_NORMALLY_CLOSED , ILCK_FEEDBACK_TYPE_DONT_CARE } |
Variables | |
ILCK_CONFIG_s | ilck_interlock_config |
ILCK_ELECTRICAL_STATE_s | ilck_interlock_state |
Header for the configuration 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_cfg.h.
#define ILCK_INTERLOCK_CONTROL (6U) |
The number of defines per contactor must be the same as the length of the array ilck_contactors_cfg in contactor_cfg.c Every contactor consists of 1 control pin and 1 feedback pin counting together as 1 contactor. E.g. if you have 1 contactor your define has to be:
#define ILCK_INTERLOCK_CONTROL (PIN_MCU_0_INTERLOCK_CONTROL)
#define ILCK_INTERLOCK_FEEDBACK (PIN_MCU_0_INTERLOCK_FEEDBACK)
Definition at line 76 of file interlock_cfg.h.
#define ILCK_INTERLOCK_FEEDBACK (0U) |
Defines the pin where interlock feedback pin is connected to the mcu
Definition at line 79 of file interlock_cfg.h.
#define ILCK_IO_REG (gioPORTA) |
IO register to which the interlock is connected
Definition at line 65 of file interlock_cfg.h.
#define ILCK_STATEMACH_SHORTTIME_MS (ILCK_TASK_CYCLE_CONTEXT_MS) |
ILCK statemachine short time definition in ms
Definition at line 92 of file interlock_cfg.h.
#define ILCK_TASK_CYCLE_CONTEXT_MS (10) |
This define MUST represent the cycle time of the task in which context the functions run, e.g., if the ILCK_Trigger() is running in the 10 ms task then the define must be set to 10.
This define also sets the minimum time.
Definition at line 89 of file interlock_cfg.h.
typedef struct ILCK_CONFIG ILCK_CONFIG_s |
struct decribing the hardware configuration of the interlock
typedef struct ILCK_ELECTRICAL_STATE ILCK_ELECTRICAL_STATE_s |
struct describing the electrical state (expected and measured) of the interlock
typedef enum ILCK_ELECTRICAL_STATE_TYPE ILCK_ELECTRICAL_STATE_TYPE_e |
Symbolic names for contactors' possible states
typedef enum ILCK_FEEDBACK_TYPE ILCK_FEEDBACK_TYPE_e |
Symbolic names defining the electric behavior of the contactor
Symbolic names for contactors' possible states
Enumerator | |
---|---|
ILCK_SWITCH_OFF | Contactor off --> Contactor is open |
ILCK_SWITCH_ON | Contactor on --> Contactor is closed |
ILCK_SWITCH_UNDEF | Contactor undefined --> Contactor state not known |
Definition at line 95 of file interlock_cfg.h.
enum ILCK_FEEDBACK_TYPE |
Symbolic names defining the electric behavior of the contactor
Definition at line 102 of file interlock_cfg.h.
|
extern |
configuration of the interlock
Definition at line 62 of file interlock_cfg.c.
|
extern |
electrical state of the interlock
Definition at line 64 of file interlock_cfg.c.