summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5a6882a)
raw | patch | inline | side by side (parent: 5a6882a)
author | Anuj Aggarwal <anuj.aggarwal@ti.com> | |
Thu, 20 Aug 2009 05:44:43 +0000 (11:14 +0530) | ||
committer | Anuj Aggarwal <anuj.aggarwal@ti.com> | |
Thu, 20 Aug 2009 05:44:43 +0000 (11:14 +0530) |
EDMA3 sample application made generic so that it takes the EDMA3
Driver handle now and all the test cases can be run on any EDMA3
controller
Driver handle now and all the test cases can be run on any EDMA3
controller
12 files changed:
index ea06c68e3c2fd1c1e6b4ec467c09540fee265028..680ab560e53e141ffac13ebedb29209138398860 100644 (file)
-/*******************************************************************************
-**+--------------------------------------------------------------------------+**
-**| **** |**
-**| **** |**
-**| ******o*** |**
-**| ********_///_**** |**
-**| ***** /_//_/ **** |**
-**| ** ** (__/ **** |**
-**| ********* |**
-**| **** |**
-**| *** |**
-**| |**
-**| Copyright (c) 1998-2006 Texas Instruments Incorporated |**
-**| ALL RIGHTS RESERVED |**
-**| |**
-**| Permission is hereby granted to licensees of Texas Instruments |**
-**| Incorporated (TI) products to use this computer program for the sole |**
-**| purpose of implementing a licensee product based on TI products. |**
-**| No other rights to reproduce, use, or disseminate this computer |**
-**| program, whether in part or in whole, are granted. |**
-**| |**
-**| TI makes no representation or warranties with respect to the |**
-**| performance of this computer program, and specifically disclaims |**
-**| any responsibility for any damages, special or consequential, |**
-**| connected with the use of this program. |**
-**| |**
-**+--------------------------------------------------------------------------+**
-*******************************************************************************/
-
-/** \file common.c
-
- \brief Demo sample application for the EDMA3 Driver for BIOS 6.
-
- (C) Copyright 2006, Texas Instruments, Inc
-
- \version 1.0 Anuj Aggarwal - Created
-
- */
+/*
+ * common.c
+ *
+ * Demo sample application for the EDMA3 Driver for BIOS 6.
+ *
+ * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 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
+ * OWNER 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.
+ *
+*/
#include "sample.h"
*/
#pragma DATA_ALIGN(_srcBuff1, EDMA3_CACHE_LINE_SIZE_IN_BYTES);
#endif /* #ifdef EDMA3_ENABLE_DCACHE */
+#pragma DATA_SECTION(_srcBuff1, ".my_sect_ddr");
signed char _srcBuff1[MAX_BUFFER_SIZE];
*/
#pragma DATA_ALIGN(_dstBuff1, EDMA3_CACHE_LINE_SIZE_IN_BYTES);
#endif /* #ifdef EDMA3_ENABLE_DCACHE */
+#pragma DATA_SECTION(_dstBuff1, ".my_sect_ddr");
signed char _dstBuff1[MAX_BUFFER_SIZE];
signed char *srcBuff1;
*/
#pragma DATA_ALIGN(_srcBuff2, EDMA3_CACHE_LINE_SIZE_IN_BYTES);
#endif /* #ifdef EDMA3_ENABLE_DCACHE */
+#pragma DATA_SECTION(_srcBuff2, ".my_sect_ddr");
signed char _srcBuff2[MAX_BUFFER_SIZE];
*/
#pragma DATA_ALIGN(_dstBuff2, EDMA3_CACHE_LINE_SIZE_IN_BYTES);
#endif /* #ifdef EDMA3_ENABLE_DCACHE */
+#pragma DATA_SECTION(_dstBuff2, ".my_sect_ddr");
signed char _dstBuff2[MAX_BUFFER_SIZE];
signed char *srcBuff2;
}
-
/* Callback function 2 */
void callback2 (unsigned int tcc, EDMA3_RM_TccStatus status,
void *appData)
diff --git a/examples/edma3_driver/src/dma_chain_test.c b/examples/edma3_driver/src/dma_chain_test.c
index 6fa4c5a3f742ce33a927afb0b4d2a93c586bb255..dddf5eca8c851d2fe664b6f374415f16cebd94e0 100644 (file)
+/*
+ * dma_chain_test.c
+ *
+ * Test case demonstrating the usgae of DMA channels for transferring data
+ * between two memory locations. The two DMA channels are chained to each other.
+ *
+ * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 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
+ * OWNER 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.
+ *
+*/
+
#include "sample.h"
extern signed char _srcBuff1[MAX_BUFFER_SIZE];
extern signed char *dstBuff2;
-/**
- * Test case demonstrating the usgae of DMA channels for transferring
- * data between two memory locations. The two DMA channels are chained
- * to each other.
- */
/**
* \brief EDMA3 mem-to-mem data copy test case, using two DMA channels,
* chained to each other.
* \return EDMA3_DRV_SOK or EDMA3_DRV Error Code
*/
EDMA3_DRV_Result edma3_test_with_chaining(
+ EDMA3_DRV_Handle hEdma,
unsigned int acnt,
unsigned int bcnt,
unsigned int ccnt,
index 1934ee035a43b89be2c7de31bedd3f7fc9520f94..7beb68d528b777e9a1a6f42350260a881552105b 100644 (file)
+/*
+ * dma_link_test.c
+ *
+ * EDMA3 mem-to-mem data copy test case, using two DMA channels, linked to each
+ * other.
+ *
+ * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 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
+ * OWNER 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.
+ *
+*/
+
#include "sample.h"
extern signed char _srcBuff1[MAX_BUFFER_SIZE];
* \return EDMA3_DRV_SOK or EDMA3_DRV Error Code
*/
EDMA3_DRV_Result edma3_test_with_link(
- unsigned int acnt,
- unsigned int bcnt,
- unsigned int ccnt,
- EDMA3_DRV_SyncType syncType)
+ EDMA3_DRV_Handle hEdma,
+ unsigned int acnt,
+ unsigned int bcnt,
+ unsigned int ccnt,
+ EDMA3_DRV_SyncType syncType)
{
EDMA3_DRV_Result result = EDMA3_DRV_SOK;
EDMA3_DRV_PaRAMRegs paramSet = {0,0,0,0,0,0,0,0,0,0,0,0};
index 5fa77b2eeef4c9edc901545f786bef7c12c3a0c6..6117c2d391a955f75808d3ceb84eba6e77046e89 100644 (file)
+/*
+ * dma_misc_test.c
+ *
+ * Miscellaneous EDMA3 test cases.
+ *
+ * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 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
+ * OWNER 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.
+ *
+*/
+
#include "sample.h"
/**
*
* \return EDMA3_DRV_SOK or EDMA3_DRV Error Code
*/
-EDMA3_DRV_Result edma3_misc_test()
+EDMA3_DRV_Result edma3_misc_test(EDMA3_DRV_Handle hEdma)
{
EDMA3_DRV_Result drvResult = EDMA3_DRV_SOK;
unsigned int ccRegOffset = 0u;
diff --git a/examples/edma3_driver/src/dma_ping_pong_test.c b/examples/edma3_driver/src/dma_ping_pong_test.c
index 9e0cde13236348f5f2050ce0693173b2f04e8468..ac451de779dc27d4c579bd78fcbc4c0cb75c831e 100644 (file)
+/*
+ * dma_ping_pong_test.c
+ *
+ * EDMA3 ping-pong buffers based data copy test case, using a DMA and a link
+ * channel.
+ *
+ * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 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
+ * OWNER 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.
+ *
+*/
+
#include "sample.h"
/** Test Case Description **/
/**
* Number of columns in the bigger source buffer.
*/
-#define PING_PONG_NUM_COLUMNS (720u)
+#define PING_PONG_NUM_COLUMNS (72u)
/**
* Number of columns in the bigger source buffer.
*/
-#define PING_PONG_NUM_ROWS (480u)
+#define PING_PONG_NUM_ROWS (48u)
/* ACNT is equal to number of columns. */
#define PING_PONG_ACNT PING_PONG_NUM_COLUMNS
*/
#pragma DATA_ALIGN(_pingpongSrcBuf, EDMA3_CACHE_LINE_SIZE_IN_BYTES);
#endif /* #ifdef EDMA3_ENABLE_DCACHE */
+#pragma DATA_SECTION(_pingpongSrcBuf, ".my_sect_ddr");
static signed char _pingpongSrcBuf[PING_PONG_DDR_BUFFER_SIZE];
*/
#pragma DATA_ALIGN(_pingpongDestBuf, EDMA3_CACHE_LINE_SIZE_IN_BYTES);
#endif /* #ifdef EDMA3_ENABLE_DCACHE */
+#pragma DATA_SECTION(_pingpongDestBuf, ".my_sect_ddr");
static signed char _pingpongDestBuf[PING_PONG_DDR_BUFFER_SIZE];
*/
#pragma DATA_ALIGN(_dstL1DBuff1, EDMA3_CACHE_LINE_SIZE_IN_BYTES);
#endif /* #ifdef EDMA3_ENABLE_DCACHE */
-#pragma DATA_SECTION(_dstL1DBuff1, "my_sect");
+#pragma DATA_SECTION(_dstL1DBuff1, ".my_sect_iram");
static signed char _dstL1DBuff1[PING_PONG_L1D_BUFFER_SIZE];
#ifdef EDMA3_ENABLE_DCACHE
*/
#pragma DATA_ALIGN(_dstL1DBuff2, EDMA3_CACHE_LINE_SIZE_IN_BYTES);
#endif /* #ifdef EDMA3_ENABLE_DCACHE */
-#pragma DATA_SECTION(_dstL1DBuff2, "my_sect");
+#pragma DATA_SECTION(_dstL1DBuff2, ".my_sect_iram");
static signed char _dstL1DBuff2[PING_PONG_L1D_BUFFER_SIZE];
/* Pointers for all those buffers */
*
* \return EDMA3_DRV_SOK or EDMA3_DRV Error Code
*/
-EDMA3_DRV_Result edma3_test_ping_pong_mode()
+EDMA3_DRV_Result edma3_test_ping_pong_mode(EDMA3_DRV_Handle hEdma)
{
EDMA3_DRV_Result result = EDMA3_DRV_SOK;
EDMA3_DRV_PaRAMRegs paramSet = {0,0,0,0,0,0,0,0,0,0,0,0};
index f1bd4db99116ee404f7e8493e531956d58db31bb..d5af04410457374029689965cad07581e4150a28 100644 (file)
+/*
+ * dma_poll_test.c
+ *
+ * Test case demonstrating the poll mode scenario. User has requested a data
+ * transfer without giving any callback function. After programming and
+ * enabling the channel, he uses different APIs (meant to be used in poll mode)
+ * to check the status of ongoing transfer. Interrupt will NOT occur in this
+ * case.
+ *
+ * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 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
+ * OWNER 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.
+ *
+*/
+
#include "sample.h"
extern signed char _srcBuff1[MAX_BUFFER_SIZE];
extern signed char *srcBuff1;
extern signed char *dstBuff1;
-/**
- * Test case demonstrating the poll mode scenario.
- * A user has requested a data transfer without giving any
- * callback function. After programming and enabling the channel,
- * he uses different APIs (meant to be used in poll mode)
- * to check the status of ongoing transfer.
- * Interrupt will NOT occur in this case.
- */
/**
* \brief EDMA3 mem-to-mem data copy test case, using a DMA channel.
* This test case doesnot rely on the callback mechanism.
* \return EDMA3_DRV_SOK or EDMA3_DRV Error Code
*/
EDMA3_DRV_Result edma3_test_poll_mode(
- unsigned int acnt,
- unsigned int bcnt,
- unsigned int ccnt,
- EDMA3_DRV_SyncType syncType)
+ EDMA3_DRV_Handle hEdma,
+ unsigned int acnt,
+ unsigned int bcnt,
+ unsigned int ccnt,
+ EDMA3_DRV_SyncType syncType)
{
EDMA3_DRV_Result result = EDMA3_DRV_SOK;
unsigned int chId = 0;
index aa7323f6baf2c1e56f7d863a553eb3d8ad4d682d..5583f4309717621f5596d511ab9d806b0aa598ce 100644 (file)
+/*
+ * dma_test.c
+ *
+ * EDMA3 mem-to-mem data copy test case, using a DMA channel.
+ *
+ * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 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
+ * OWNER 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.
+ *
+*/
+
#include "sample.h"
extern signed char _srcBuff1[MAX_BUFFER_SIZE];
* \return EDMA3_DRV_SOK or EDMA3_DRV Error Code
*/
EDMA3_DRV_Result edma3_test(
+ EDMA3_DRV_Handle hEdma,
unsigned int acnt,
unsigned int bcnt,
unsigned int ccnt,
index 51960749a19e086367e513ae09e62ac7180985e8..f3bf29561df7e79ed305ca4bbe22b013656abe54 100644 (file)
-/*******************************************************************************
-**+--------------------------------------------------------------------------+**
-**| **** |**
-**| **** |**
-**| ******o*** |**
-**| ********_///_**** |**
-**| ***** /_//_/ **** |**
-**| ** ** (__/ **** |**
-**| ********* |**
-**| **** |**
-**| *** |**
-**| |**
-**| Copyright (c) 1998-2006 Texas Instruments Incorporated |**
-**| ALL RIGHTS RESERVED |**
-**| |**
-**| Permission is hereby granted to licensees of Texas Instruments |**
-**| Incorporated (TI) products to use this computer program for the sole |**
-**| purpose of implementing a licensee product based on TI products. |**
-**| No other rights to reproduce, use, or disseminate this computer |**
-**| program, whether in part or in whole, are granted. |**
-**| |**
-**| TI makes no representation or warranties with respect to the |**
-**| performance of this computer program, and specifically disclaims |**
-**| any responsibility for any damages, special or consequential, |**
-**| connected with the use of this program. |**
-**| |**
-**+--------------------------------------------------------------------------+**
-*******************************************************************************/
-
-/** \file main.c
+/*
+ * main.c
*
- * \brief This file contains the test / demo code to demonstrate the
- * EDMA driver implemented for DSP/BIOS
+ * This file contains the test / demo code to demonstrate the EDMA3 driver
+ * functionality on DSP/BIOS 6.
*
- * (C) Copyright 2006, Texas Instruments, Inc
+ * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
*
- * \author Anuj Aggarwal
*
- * \version 1.0 Anuj Aggarwal - Created
- */
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 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
+ * OWNER 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.
+ *
+*/
#include <xdc/std.h>
#include <stdio.h>
#include <ti/sysbios/BIOS.h>
#include "sample.h"
+extern const unsigned int numEdma3Instances;
-EDMA3_DRV_Result edma3MemToMemCpytest ();
+EDMA3_DRV_Result edma3MemToMemCpytest (EDMA3_DRV_Handle hEdma);
/*
* Local References
BIOS_start();
}
-
static void printWelcomeBanner(void)
{
/* Welcome Message */
}
-
void echo()
{
EDMA3_DRV_Result edmaResult = EDMA3_DRV_SOK;
+ unsigned int i;
+ unsigned int count=0;
+ EDMA3_DRV_Handle hEdma;
/* Print the Welcome Message */
printWelcomeBanner();
- /* Initialize EDMA3 first */
- edmaResult = edma3init();
- if (edmaResult != EDMA3_DRV_SOK)
- {
- printf("echo: edma3init() FAILED, error code: %d\r\n",
- edmaResult);
- }
- else
- {
- printf("echo: edma3init() PASSED\r\n");
- }
-
- if (edmaResult == EDMA3_DRV_SOK)
- {
- /* Edma Test for memory to memory copy */
- printf("\r\nEDMA3: Starting EDMA3 Test memory to memory copy\r\n");
-
- edmaResult = edma3MemToMemCpytest();
-
- if (EDMA3_DRV_SOK != edmaResult)
- {
- /* Report EDMA Error */
- printf("\r\nEDMA3: edma3MemToMemCpytest() failed\r\n");
- }
- else
- {
- printf("\r\nEDMA3: edma3MemToMemCpytest() passed\r\n");
- }
-
- printf("\r\nEDMA3 : End EDMA3 Test memory to memory copy\r\n\n");
- }
-
- /* De-init EDMA3 now. */
- edmaResult = edma3deinit();
- if (edmaResult != EDMA3_DRV_SOK)
- {
- printf("echo: edma3deinit() FAILED, error code: %d\r\n",
- edmaResult);
- }
- else
- {
- printf("echo: edma3deinit() PASSED\r\n");
- }
+ for (count=0; count<10; count++)
+ {
+ printf ("\nCount = %d\n",count);
+
+ for (i = 0; i < numEdma3Instances; i++)
+ {
+ hEdma = edma3init(i, &edmaResult);
+ if (hEdma)
+ {
+ printf("edma3init() Passed\n");
+ }
+ else
+ {
+ printf("edma3init() Failed, error code: %d\n", edmaResult);
+ }
+
+ if (edmaResult == EDMA3_DRV_SOK)
+ {
+ printf("\nStart -> EDMA3 Test memory to memory copy on Instance %d\n",i);
+
+ edmaResult = edma3MemToMemCpytest(hEdma);
+
+ if (EDMA3_DRV_SOK != edmaResult)
+ {
+ /* Report EDMA Error */
+ printf("edma3MemToMemCpytest() Failed\n");
+ }
+ else
+ {
+ printf("edma3MemToMemCpytest() Passed\n");
+ }
+
+ printf("\nEnd -> EDMA3 Test memory to memory copy\n\n");
+ }
+
+ /* De-init EDMA3 */
+ if (hEdma)
+ {
+ edmaResult = edma3deinit(i, hEdma);
+ if (edmaResult != EDMA3_DRV_SOK)
+ {
+ printf("edma3deinit() Failed, error code: %d\n", edmaResult);
+ }
+ else
+ {
+ printf("edma3deinit() Passed\n");
+ }
+ }
+ }
+ }
/* Start the Heart Beat Print */
tskHeartBit();
}
-
-
/**
* \brief Main sample test case which will call other EDMA3 test cases.
* If one wants to call Edma3 test cases, include this main
*
* \return EDMA3_DRV_SOK or EDMA3_DRV Error Code
*/
-EDMA3_DRV_Result edma3MemToMemCpytest ()
+EDMA3_DRV_Result edma3MemToMemCpytest (EDMA3_DRV_Handle hEdma)
{
EDMA3_DRV_Result result = EDMA3_DRV_SOK;
{
result = EDMA3_DRV_E_INVALID_PARAM;
}
-
+
/* Edma test without linking, async, incr mode */
if (result == EDMA3_DRV_SOK)
{
- result = edma3_test(512u, 32u, 8u, EDMA3_DRV_SYNC_A);
+ result = edma3_test(hEdma, MAX_ACOUNT, MAX_BCOUNT, MAX_CCOUNT, EDMA3_DRV_SYNC_A);
if (result == EDMA3_DRV_SOK)
{
/* Edma test with linking, async, incr mode */
if (result == EDMA3_DRV_SOK)
{
- result = edma3_test_with_link(512u, 32u, 8u, EDMA3_DRV_SYNC_A);
+ result = edma3_test_with_link(hEdma, MAX_ACOUNT, MAX_BCOUNT, MAX_CCOUNT, EDMA3_DRV_SYNC_A);
if (result == EDMA3_DRV_SOK)
{
/* Qdma test, async, incr mode */
if (result == EDMA3_DRV_SOK)
{
- result = qdma_test(512u, 32u, 8u, EDMA3_DRV_SYNC_A);
+ result = qdma_test(hEdma, MAX_ACOUNT, MAX_BCOUNT, MAX_CCOUNT, EDMA3_DRV_SYNC_A);
if (result == EDMA3_DRV_SOK)
{
/* Qdma test with linking, async, incr mode */
if (result == EDMA3_DRV_SOK)
{
- result = qdma_test_with_link (512u, 32u, 8u, EDMA3_DRV_SYNC_A);
+ result = qdma_test_with_link (hEdma, MAX_ACOUNT, MAX_BCOUNT, MAX_CCOUNT, EDMA3_DRV_SYNC_A);
if (result == EDMA3_DRV_SOK)
{
/* DMA channels with chaining test. */
if (result == EDMA3_DRV_SOK)
{
- result = edma3_test_with_chaining(512u, 32u, 8u, EDMA3_DRV_SYNC_A);
+ result = edma3_test_with_chaining(hEdma, MAX_ACOUNT, MAX_BCOUNT, MAX_CCOUNT, EDMA3_DRV_SYNC_A);
if (result == EDMA3_DRV_SOK)
{
/* DMA channels using Polling mode test. */
if (result == EDMA3_DRV_SOK)
{
- result = edma3_test_poll_mode(512u, 32u, 8u, EDMA3_DRV_SYNC_A);
+ result = edma3_test_poll_mode(hEdma, MAX_ACOUNT, MAX_BCOUNT, MAX_CCOUNT, EDMA3_DRV_SYNC_A);
if (result == EDMA3_DRV_SOK)
{
/* DMA channels in using ping-pong buffers test. */
if (result == EDMA3_DRV_SOK)
{
- result = edma3_test_ping_pong_mode();
+ result = edma3_test_ping_pong_mode(hEdma);
if (result == EDMA3_DRV_SOK)
{
/* Misc tests. */
if (result == EDMA3_DRV_SOK)
{
- result = edma3_misc_test();
+ result = edma3_misc_test(hEdma);
if (result == EDMA3_DRV_SOK)
{
}
-
void tskHeartBit()
{
static unsigned int counter = 0u;
while (counter < 0x1000000u)
{
- Task_sleep (1000u);
printf("\r\n\r\n!!! EDMA3 LLD HrtBt %x", counter);
counter++;
}
}
-
diff --git a/examples/edma3_driver/src/ping_pong.cmd b/examples/edma3_driver/src/ping_pong.cmd
+++ /dev/null
@@ -1,4 +0,0 @@
-SECTIONS
-{
- my_sect :> IRAM
-}
\ No newline at end of file
diff --git a/examples/edma3_driver/src/qdma_link_test.c b/examples/edma3_driver/src/qdma_link_test.c
index 429d16e64e1f30a622dbfda387253e543cde837e..2130110e02d04f34be92d0a26b4529028a696709 100644 (file)
+/*
+ * qdma_link_test.c
+ *
+ * Test case demonstrating the usgae of QDMA channel for transferring data
+ * between two memory locations. QDMA channel is linked to a LINK channel.
+ *
+ * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 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
+ * OWNER 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.
+ *
+*/
+
#include "sample.h"
extern signed char _srcBuff1[MAX_BUFFER_SIZE];
extern signed char *dstBuff1;
extern signed char *dstBuff2;
-
-/**
- * Test case demonstrating the usgae of QDMA channel for transferring
- * data between two memory locations. QDMA channel is linked to a LINK
- * channel.
- */
/**
* \brief EDMA3 mem-to-mem data copy test case, using a QDMA channel,
* linked to another LINK channel.
* \return EDMA3_DRV_SOK or EDMA3_DRV Error Code
*/
EDMA3_DRV_Result qdma_test_with_link(
+ EDMA3_DRV_Handle hEdma,
unsigned int acnt,
unsigned int bcnt,
unsigned int ccnt,
index 5197950afc2c7195c1ed93d5cac5d45b3605bad2..276f7fffdae66b3e43d27cc95dc432a9d7e172d1 100644 (file)
+/*
+ * qdma_test.c
+ *
+ * EDMA3 mem-to-mem data copy test case, using a QDMA channel.
+ *
+ * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 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
+ * OWNER 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.
+ *
+*/
+
#include "sample.h"
extern signed char _srcBuff1[MAX_BUFFER_SIZE];
* \return EDMA3_DRV_SOK or EDMA3_DRV Error Code
*/
EDMA3_DRV_Result qdma_test(
+ EDMA3_DRV_Handle hEdma,
unsigned int acnt,
unsigned int bcnt,
unsigned int ccnt,
index a022bac2321988c931a430ca84fb838957bf5afc..cc41e59f96464316957fa66d3e3677f17a199a34 100644 (file)
-/*******************************************************************************
-**+--------------------------------------------------------------------------+**
-**| **** |**
-**| **** |**
-**| ******o*** |**
-**| ********_///_**** |**
-**| ***** /_//_/ **** |**
-**| ** ** (__/ **** |**
-**| ********* |**
-**| **** |**
-**| *** |**
-**| |**
-**| Copyright (c) 1998-2006 Texas Instruments Incorporated |**
-**| ALL RIGHTS RESERVED |**
-**| |**
-**| Permission is hereby granted to licensees of Texas Instruments |**
-**| Incorporated (TI) products to use this computer program for the sole |**
-**| purpose of implementing a licensee product based on TI products. |**
-**| No other rights to reproduce, use, or disseminate this computer |**
-**| program, whether in part or in whole, are granted. |**
-**| |**
-**| TI makes no representation or warranties with respect to the |**
-**| performance of this computer program, and specifically disclaims |**
-**| any responsibility for any damages, special or consequential, |**
-**| connected with the use of this program. |**
-**| |**
-**+--------------------------------------------------------------------------+**
-*******************************************************************************/
-
-/** \file bios6_edma3_drv_sample.h
-
- \brief Header file for the Demo application for the EDMA3 Driver.
-
- (C) Copyright 2006, Texas Instruments, Inc
-
- \version 1.0 Anuj Aggarwal - Created
-
- */
+/*
+ * bios6_edma3_drv_sample.h
+ *
+ * Header file for the Demo application for the EDMA3 Driver.
+ *
+ * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
+ *
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of Texas Instruments Incorporated nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * 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
+ * OWNER 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.
+ *
+*/
#ifndef _SAMPLE_H_
#define _SAMPLE_H_
#include <ti/sysbios/knl/Task.h>
/* Include EDMA3 Driver */
-#include <ti/sdo/edma3/drv/edma3_drv.h>
+#include <ti/sdo/edma3/drv/sample/bios6_edma3_drv_sample.h>
#ifdef __cplusplus
extern "C" {
#endif
-
-/* To include linking or chaining test case. */
-#define QDMA_TEST_WITH_LINKING (1u)
-/* #undef QDMA_TEST_WITH_LINKING */
-
-#define EDMA3_TEST_WITH_CHAINING (1u)
-/* #undef EDMA3_TEST_WITH_CHAINING */
-
-/* To include Poll mode tests */
-#define EDMA3_POLL_MODE_TEST (1u)
-/* #undef EDMA3_POLL_MODE_TEST */
-
-/* To include ping-pong buffer tests */
-#define EDMA3_PING_PONG_TEST (1u)
-/* #undef EDMA3_PING_PONG_TEST */
-
-
+/* MAX ACOUNT */
+#define MAX_ACOUNT (64u)
+/* MAX BCOUNT */
+#define MAX_BCOUNT (1u)
+/* MAX CCOUNT */
+#define MAX_CCOUNT (1u)
/**
* Buffers (src and dest) are needed for mem-2-mem data transfers.
* This define is for the MAXIMUM size and hence the maximum data
* which could be transferred using the sample test cases below.
*/
-#define MAX_BUFFER_SIZE (512u*32u*8u)
-
-/**
- * Cache line size on the underlying SoC. It needs to be modified
- * for different cache line sizes, if the Cache is Enabled.
- */
-#define EDMA3_CACHE_LINE_SIZE_IN_BYTES (128u)
+#define MAX_BUFFER_SIZE (MAX_ACOUNT * MAX_BCOUNT * MAX_CCOUNT)
/* To enable/disable the cache .*/
#define EDMA3_ENABLE_DCACHE (1u)
#define OPT_ITCINTEN_SHIFT (0x00000015u)
#define OPT_TCINTEN_SHIFT (0x00000014u)
-
-/* Error returned in case of data mismatch */
-#define EDMA3_DATA_MISMATCH_ERROR (-1)
-
-
-
/**
* EDMA3 Driver Handle, which is used to call all the Driver APIs.
* It gets initialized during EDMA3 Initialization.
*/
-extern EDMA3_DRV_Handle hEdma;
-
+extern EDMA3_DRV_Handle hEdma[];
extern void callback1 (unsigned int tcc, EDMA3_RM_TccStatus status,
void *appData);
* \return EDMA3_DRV_SOK or EDMA3_DRV Error Code
*/
EDMA3_DRV_Result edma3_test(
+ EDMA3_DRV_Handle hEdma,
unsigned int acnt,
unsigned int bcnt,
unsigned int ccnt,
* \return EDMA3_DRV_SOK or EDMA3_DRV Error Code
*/
EDMA3_DRV_Result edma3_test_with_link(
+ EDMA3_DRV_Handle hEdma,
unsigned int acnt,
unsigned int bcnt,
unsigned int ccnt,
* \return EDMA3_DRV_SOK or EDMA3_DRV Error Code
*/
EDMA3_DRV_Result qdma_test(
+ EDMA3_DRV_Handle hEdma,
unsigned int acnt,
unsigned int bcnt,
unsigned int ccnt,
*
* \return EDMA3_DRV_SOK or EDMA3_DRV Error Code
*/
-EDMA3_DRV_Result edma3_misc_test();
+EDMA3_DRV_Result edma3_misc_test(EDMA3_DRV_Handle hEdma);
/**
* \return EDMA3_DRV_SOK or EDMA3_DRV Error Code
*/
EDMA3_DRV_Result qdma_test_with_link(
+ EDMA3_DRV_Handle hEdma,
unsigned int acnt,
unsigned int bcnt,
unsigned int ccnt,
* \return EDMA3_DRV_SOK or EDMA3_DRV Error Code
*/
EDMA3_DRV_Result edma3_test_with_chaining(
+ EDMA3_DRV_Handle hEdma,
unsigned int acnt,
unsigned int bcnt,
unsigned int ccnt,
* \return EDMA3_DRV_SOK or EDMA3_DRV Error Code
*/
EDMA3_DRV_Result edma3_test_poll_mode(
+ EDMA3_DRV_Handle hEdma,
unsigned int acnt,
unsigned int bcnt,
unsigned int ccnt,
*
* \return EDMA3_DRV_SOK or EDMA3_DRV Error Code
*/
-EDMA3_DRV_Result edma3_test_ping_pong_mode();
-
+EDMA3_DRV_Result edma3_test_ping_pong_mode(EDMA3_DRV_Handle hEdma);
#ifdef __cplusplus
}