foxBMS - Unit Tests
1.3.0
The foxBMS Unit Tests API Documentation
|
Test of the ltc_afe_dma.c module in ltc. More...
#include "unity.h"
#include "MockHL_sys_dma.h"
#include "Mockfassert.h"
#include "Mockio.h"
#include "Mockltc.h"
#include "Mockspi.h"
#include "ltc_cfg.h"
#include "spi_cfg.h"
#include "ltc_afe_dma.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 | testDummy (void) |
Variables | |
uint8_t | ltc_RXPECbuffer [LTC_N_BYTES_FOR_DATA_TRANSMISSION] = {0} |
uint8_t | ltc_TXPECbuffer [LTC_N_BYTES_FOR_DATA_TRANSMISSION] = {0} |
LTC_STATE_s | ltc_stateBase |
g_dmaCTRL | afe_ltcDmaControlPacketTx |
g_dmaCTRL | afe_ltcDmaControlPacketRx |
Test of the ltc_afe_dma.c module in ltc.
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_dma.c.
#define BIG_ENDIAN (3U) |
Definition at line 79 of file test_ltc_afe_dma.c.
#define DMA_REQ_LINE_RX (DMA_REQ_LINE_SPI1_RX) |
Definition at line 85 of file test_ltc_afe_dma.c.
#define DMA_REQ_LINE_SPI1_RX (DMA_REQ0) |
Definition at line 73 of file test_ltc_afe_dma.c.
#define DMA_REQ_LINE_SPI1_TX (DMA_REQ1) |
Definition at line 72 of file test_ltc_afe_dma.c.
#define DMA_REQ_LINE_SPI2_RX (DMA_REQ2) |
Definition at line 75 of file test_ltc_afe_dma.c.
#define DMA_REQ_LINE_SPI2_TX (DMA_REQ3) |
Definition at line 74 of file test_ltc_afe_dma.c.
#define DMA_REQ_LINE_SPI3_RX (DMA_REQ14) |
Definition at line 77 of file test_ltc_afe_dma.c.
#define DMA_REQ_LINE_SPI3_TX (DMA_REQ15) |
Definition at line 76 of file test_ltc_afe_dma.c.
#define DMA_REQ_LINE_TX (DMA_REQ_LINE_SPI1_TX) |
Definition at line 84 of file test_ltc_afe_dma.c.
#define DMAREQEN_BIT (0x10000U) |
Definition at line 81 of file test_ltc_afe_dma.c.
#define ELEMENT_COUNT (1U) |
Definition at line 80 of file test_ltc_afe_dma.c.
#define SPIEN_BIT (0x1000000U) |
Definition at line 82 of file test_ltc_afe_dma.c.
void setUp | ( | void | ) |
Definition at line 158 of file test_ltc_afe_dma.c.
void tearDown | ( | void | ) |
Definition at line 161 of file test_ltc_afe_dma.c.
void testDummy | ( | void | ) |
Definition at line 166 of file test_ltc_afe_dma.c.
g_dmaCTRL afe_ltcDmaControlPacketRx |
Definition at line 138 of file test_ltc_afe_dma.c.
g_dmaCTRL afe_ltcDmaControlPacketTx |
Definition at line 119 of file test_ltc_afe_dma.c.
uint8_t ltc_RXPECbuffer[LTC_N_BYTES_FOR_DATA_TRANSMISSION] = {0} |
Definition at line 69 of file test_ltc_afe_dma.c.
LTC_STATE_s ltc_stateBase |
This variable contains the internal state of the LTC state machine.
Definition at line 87 of file test_ltc_afe_dma.c.
uint8_t ltc_TXPECbuffer[LTC_N_BYTES_FOR_DATA_TRANSMISSION] = {0} |
Definition at line 70 of file test_ltc_afe_dma.c.