foxBMS  1.6.0
The foxBMS Battery Management System API Documentation
adi_ades183x_commands_voltages.c
Go to the documentation of this file.
1 /**
2  *
3  * @copyright © 2010 - 2023, Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V.
4  * All rights reserved.
5  *
6  * SPDX-License-Identifier: BSD-3-Clause
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions are met:
10  *
11  * 1. Redistributions of source code must retain the above copyright notice, this
12  * list of conditions and the following disclaimer.
13  *
14  * 2. Redistributions in binary form must reproduce the above copyright notice,
15  * this list of conditions and the following disclaimer in the documentation
16  * and/or other materials provided with the distribution.
17  *
18  * 3. Neither the name of the copyright holder nor the names of its
19  * contributors may be used to endorse or promote products derived from
20  * this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  *
33  * We kindly request you to use one or more of the following phrases to refer to
34  * foxBMS in your hardware, software, documentation or advertising materials:
35  *
36  * - ″This product uses parts of foxBMS®″
37  * - ″This product includes parts of foxBMS®″
38  * - ″This product is derived from foxBMS®″
39  *
40  */
41 
42 /**
43  * @file adi_ades183x_commands_voltages.c
44  * @author foxBMS Team
45  * @date 2022-12-06 (date of creation)
46  * @updated 2023-10-12 (date of last update)
47  * @version v1.6.0
48  * @ingroup DRIVERS
49  * @prefix ADI
50  *
51  * @brief Command definitions related to voltage measurement only specific to
52  * the driver for the ADI ades183x.
53  *
54  */
55 
56 /*========== Includes =======================================================*/
58 
59 #include "adi_ades183x_defs.h"
60 #include "fassert.h"
61 
62 #include <stdint.h>
63 
64 /*========== Macros and Definitions =========================================*/
65 
66 /*========== Static Constant and Variable Definitions =======================*/
71  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
76  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
81  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
86  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
91  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
96  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
97 
102  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
107  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
112  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
117  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
122  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
127  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
128 
133  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
138  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
143  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
148  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
153  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
158  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
159 
164  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
169  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
174  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
179  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
184  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
189  "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES");
190 
191 /*========== Extern Constant and Variable Definitions =======================*/
192 
193 /*========== Static Function Prototypes =====================================*/
194 
195 /*========== Static Function Implementations ================================*/
196 
197 /*========== Extern Function Implementations ================================*/
198 
199 /*========== Externalized Static Function Implementations (Unit Test) =======*/
200 #ifdef UNITY_UNIT_TEST
201 #endif
const uint16_t adi_cmdRdsva[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdsvb[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdsvf[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdacf[ADI_COMMAND_DEFINITION_LENGTH]
FAS_STATIC_ASSERT((ADI_RDCVA_LEN<=ADI_MAX_REGISTER_SIZE_IN_BYTES), "Register length must not be greater than ADI_MAX_REGISTER_SIZE_IN_BYTES")
const uint16_t adi_cmdRdcvd[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdsvd[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdfcb[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdsve[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdfce[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdfcf[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdfcd[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdcva[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdacc[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdaca[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdcvb[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdace[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdfcc[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdfca[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdsvc[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdcvf[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdacd[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdacb[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdcve[ADI_COMMAND_DEFINITION_LENGTH]
const uint16_t adi_cmdRdcvc[ADI_COMMAND_DEFINITION_LENGTH]
Header file of some software.
Headers for the driver for the ades183x analog front-end.
#define ADI_RDACB_BYTE0
#define ADI_RDFCF_BYTE0
#define ADI_RDFCD_LEN
#define ADI_RDSVF_INC
#define ADI_RDSVD_LEN
#define ADI_RDACD_BYTE0
#define ADI_RDSVD_BYTE1
#define ADI_RDSVC_INC
#define ADI_RDCVA_BYTE1
#define ADI_RDACF_INC
#define ADI_RDFCB_INC
#define ADI_RDACE_LEN
#define ADI_RDFCF_LEN
#define ADI_RDSVA_BYTE1
#define ADI_RDCVF_BYTE0
#define ADI_RDSVC_BYTE1
#define ADI_RDCVE_BYTE1
#define ADI_RDACB_LEN
#define ADI_RDCVC_INC
#define ADI_RDACF_BYTE1
#define ADI_RDSVB_INC
#define ADI_RDCVC_BYTE1
#define ADI_RDACA_INC
#define ADI_RDFCA_LEN
#define ADI_RDACE_BYTE1
#define ADI_RDFCE_INC
#define ADI_RDFCE_BYTE1
#define ADI_RDCVE_BYTE0
#define ADI_RDCVE_INC
#define ADI_RDFCA_BYTE0
#define ADI_RDSVA_BYTE0
#define ADI_RDSVA_LEN
#define ADI_RDFCA_BYTE1
#define ADI_RDSVC_BYTE0
#define ADI_RDSVD_BYTE0
#define ADI_RDFCD_INC
#define ADI_RDACC_LEN
#define ADI_RDSVF_LEN
#define ADI_RDFCC_BYTE0
#define ADI_RDCVB_BYTE0
#define ADI_RDFCD_BYTE0
#define ADI_RDCVB_BYTE1
#define ADI_RDACD_BYTE1
#define ADI_RDFCC_LEN
#define ADI_RDSVF_BYTE1
#define ADI_RDCVB_LEN
#define ADI_RDCVB_INC
#define ADI_RDSVF_BYTE0
#define ADI_RDCVD_BYTE0
#define ADI_RDFCC_INC
#define ADI_RDACC_INC
#define ADI_RDFCC_BYTE1
#define ADI_RDCVF_INC
#define ADI_RDSVE_BYTE0
#define ADI_RDSVB_BYTE0
#define ADI_RDACE_INC
#define ADI_RDACB_BYTE1
#define ADI_RDSVC_LEN
#define ADI_MAX_REGISTER_SIZE_IN_BYTES
#define ADI_RDCVD_INC
#define ADI_RDACC_BYTE1
#define ADI_RDFCA_INC
#define ADI_RDCVF_BYTE1
#define ADI_RDFCF_BYTE1
#define ADI_RDACD_LEN
#define ADI_RDCVA_LEN
#define ADI_RDSVE_LEN
#define ADI_RDCVD_LEN
#define ADI_RDCVA_BYTE0
#define ADI_RDACF_BYTE0
#define ADI_RDACF_LEN
#define ADI_RDCVD_BYTE1
#define ADI_RDFCF_INC
#define ADI_RDCVA_INC
#define ADI_RDFCE_LEN
#define ADI_RDSVA_INC
#define ADI_RDACC_BYTE0
#define ADI_RDACD_INC
#define ADI_RDSVD_INC
#define ADI_RDCVF_LEN
#define ADI_RDACA_BYTE1
#define ADI_RDACA_LEN
#define ADI_RDSVE_BYTE1
#define ADI_RDACE_BYTE0
#define ADI_RDCVE_LEN
#define ADI_RDFCB_BYTE1
#define ADI_RDACB_INC
#define ADI_RDFCB_BYTE0
#define ADI_RDCVC_BYTE0
#define ADI_RDACA_BYTE0
#define ADI_RDFCD_BYTE1
#define ADI_RDSVB_BYTE1
#define ADI_RDSVE_INC
#define ADI_RDFCE_BYTE0
#define ADI_RDSVB_LEN
#define ADI_RDFCB_LEN
#define ADI_COMMAND_DEFINITION_LENGTH
#define ADI_RDCVC_LEN
Assert macro implementation.