foxBMS - Unit Tests
1.3.0
The foxBMS Unit Tests API Documentation
|
Test of the afe.c module. More...
#include "general.h"
#include "unity.h"
#include "MockHL_sys_dma.h"
#include "Mockltc.h"
#include "ltc_cfg.h"
#include "afe.h"
Go to the source code of this file.
Macros | |
#define | DMA_REQ_LINE_SPI1_TX (DMA_REQ1) |
#define | DMA_REQ_LINE_SPI1_RX (DMA_REQ0) |
#define | DMA_REQ_LINE_SPI2_TX (DMA_REQ3) |
#define | DMA_REQ_LINE_SPI2_RX (DMA_REQ2) |
#define | DMA_REQ_LINE_SPI3_TX (DMA_REQ15) |
#define | DMA_REQ_LINE_SPI3_RX (DMA_REQ14) |
#define | BIG_ENDIAN (3U) |
#define | ELEMENT_COUNT (1U) |
#define | DMAREQEN_BIT (0x10000U) |
#define | SPIEN_BIT (0x1000000U) |
#define | DMA_REQ_LINE_TX (DMA_REQ_LINE_SPI1_TX) |
#define | DMA_REQ_LINE_RX (DMA_REQ_LINE_SPI1_RX) |
Functions | |
void | setUp (void) |
void | tearDown (void) |
void | testAFE_TriggerIcAlwaysReturnsSTD_OK (void) |
Variables | |
uint8_t | ltc_RXPECbuffer [LTC_N_BYTES_FOR_DATA_TRANSMISSION] = {0} |
uint8_t | ltc_TXPECbuffer [LTC_N_BYTES_FOR_DATA_TRANSMISSION] = {0} |
g_dmaCTRL | afe_ltcDmaControlPacketTx |
g_dmaCTRL | afe_ltcDmaControlPacketRx |
LTC_STATE_s | ltc_stateBase = {0} |
Test of the afe.c module.
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 test_ltc_afe.c.
#define BIG_ENDIAN (3U) |
Definition at line 81 of file test_ltc_afe.c.
#define DMA_REQ_LINE_RX (DMA_REQ_LINE_SPI1_RX) |
Definition at line 87 of file test_ltc_afe.c.
#define DMA_REQ_LINE_SPI1_RX (DMA_REQ0) |
Definition at line 75 of file test_ltc_afe.c.
#define DMA_REQ_LINE_SPI1_TX (DMA_REQ1) |
Definition at line 74 of file test_ltc_afe.c.
#define DMA_REQ_LINE_SPI2_RX (DMA_REQ2) |
Definition at line 77 of file test_ltc_afe.c.
#define DMA_REQ_LINE_SPI2_TX (DMA_REQ3) |
Definition at line 76 of file test_ltc_afe.c.
#define DMA_REQ_LINE_SPI3_RX (DMA_REQ14) |
Definition at line 79 of file test_ltc_afe.c.
#define DMA_REQ_LINE_SPI3_TX (DMA_REQ15) |
Definition at line 78 of file test_ltc_afe.c.
#define DMA_REQ_LINE_TX (DMA_REQ_LINE_SPI1_TX) |
Definition at line 86 of file test_ltc_afe.c.
#define DMAREQEN_BIT (0x10000U) |
Definition at line 83 of file test_ltc_afe.c.
#define ELEMENT_COUNT (1U) |
Definition at line 82 of file test_ltc_afe.c.
#define SPIEN_BIT (0x1000000U) |
Definition at line 84 of file test_ltc_afe.c.
void setUp | ( | void | ) |
Definition at line 131 of file test_ltc_afe.c.
void tearDown | ( | void | ) |
Definition at line 134 of file test_ltc_afe.c.
void testAFE_TriggerIcAlwaysReturnsSTD_OK | ( | void | ) |
g_dmaCTRL afe_ltcDmaControlPacketRx |
Definition at line 109 of file test_ltc_afe.c.
g_dmaCTRL afe_ltcDmaControlPacketTx |
Definition at line 90 of file test_ltc_afe.c.
uint8_t ltc_RXPECbuffer[LTC_N_BYTES_FOR_DATA_TRANSMISSION] = {0} |
Definition at line 71 of file test_ltc_afe.c.
LTC_STATE_s ltc_stateBase = {0} |
This variable contains the internal state of the LTC state machine.
Definition at line 128 of file test_ltc_afe.c.
uint8_t ltc_TXPECbuffer[LTC_N_BYTES_FOR_DATA_TRANSMISSION] = {0} |
Definition at line 72 of file test_ltc_afe.c.