Minor clean-up in driver sample init lib header file
authorAnuj Aggarwal <anuj.aggarwal@ti.com>
Thu, 20 Aug 2009 05:41:32 +0000 (11:11 +0530)
committerAnuj Aggarwal <anuj.aggarwal@ti.com>
Thu, 20 Aug 2009 05:41:32 +0000 (11:11 +0530)
packages/ti/sdo/edma3/drv/sample/bios6_edma3_drv_sample.h

index 5dfe67564db68cbad20f498cb883db8c69169eae..b6b233f68f673b6b6f4751cb89fda55f3402163c 100644 (file)
@@ -1,41 +1,40 @@
-/*******************************************************************************
-**+--------------------------------------------------------------------------+**
-**|                            ****                                          |**
-**|                            ****                                          |**
-**|                            ******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 sample 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 _BIOS6_EDMA3_DRV_SAMPLE_H_
 #define _BIOS6_EDMA3_DRV_SAMPLE_H_
@@ -57,24 +56,10 @@ extern "C" {
 #define EDMA3_CACHE_LINE_SIZE_IN_BYTES      (128u)
 
 /* Error returned in case of buffers are not aligned on the cache boundary */
-#define EDMA3_NON_ALIGNED_BUFFERS_ERROR     (-2)
-
-
-/**
- * \brief SoC specific TC related information. Specified in the sample
- * configuration file (bios_edma3_sample_cfg.c).
- */
-extern unsigned int numEdma3Tc;
-extern unsigned int ccXferCompInt;
-extern unsigned int ccErrorInt;
-extern unsigned int tcErrorInt[8];
-
-extern unsigned int hwIntXferComp;
-extern unsigned int hwIntCcErr;
-extern unsigned int hwIntTcErr;
-
-
+#define EDMA3_NON_ALIGNED_BUFFERS_ERROR     (-1)
 
+/* Error returned in case of data mismatch */
+#define EDMA3_DATA_MISMATCH_ERROR           (-2)
 
 /**
  * \brief   EDMA3 Initialization
@@ -84,7 +69,7 @@ extern unsigned int hwIntTcErr;
  *
   * \return  EDMA3_DRV_SOK if success, else error code
  */
-EDMA3_DRV_Result edma3init (void);
+EDMA3_DRV_Handle edma3init (unsigned int edma3Id, EDMA3_DRV_Result *errorCode);
 
 /**
  * \brief   EDMA3 De-initialization
@@ -94,7 +79,7 @@ EDMA3_DRV_Result edma3init (void);
  *
   * \return  EDMA3_DRV_SOK if success, else error code
  */
-EDMA3_DRV_Result edma3deinit (void);
+EDMA3_DRV_Result edma3deinit (unsigned int edma3Id, EDMA3_DRV_Handle hEdma);
 
 
 /**