⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bios_edma3_drv_sample_main.c

📁 vicp做为dm6446上的硬件加速器
💻 C
字号:
/*******************************************************************************
**+--------------------------------------------------------------------------+**
**|                            ****                                          |**
**|                            ****                                          |**
**|                            ******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   bios_edma3_drv_sample_main.c
 *
 *  \brief  This file contains the test / demo code to demonstrate the
 *          EDMA driver implemented for DSP/BIOS
 *
 *  (C) Copyright 2006, Texas Instruments, Inc
 *
 *  \author     Anuj Aggarwal
 *  \version    0.1
 */

#include <std.h>
#include <tsk.h>

#include <ti/sdo/edma3/drv/sample/bios_edma3_drv_sample.h>

EDMA3_DRV_Result edma3MemToMemCpytest ();

static void tskHeartBit();

void main()
    {
    }


static void printWelcomeBanner(void)
    {
    /* Welcome Message */
    EDMA3_DEBUG_PRINTF("***************************************************************\n\r");
    EDMA3_DEBUG_PRINTF("*                                                             *\n\r");
    EDMA3_DEBUG_PRINTF("*                            ****                             *\n\r");
    EDMA3_DEBUG_PRINTF("*                            ****                             *\n\r");
    EDMA3_DEBUG_PRINTF("*                            ******o***                       *\n\r");
    EDMA3_DEBUG_PRINTF("*                      ********_///_****                      *\n\r");
    EDMA3_DEBUG_PRINTF("*                      ***** /_//_/ ****                      *\n\r");
    EDMA3_DEBUG_PRINTF("*                       ** ** (__/ ****                       *\n\r");
    EDMA3_DEBUG_PRINTF("*                           *********                         *\n\r");
    EDMA3_DEBUG_PRINTF("*                            ****                             *\n\r");
    EDMA3_DEBUG_PRINTF("*                            ***                              *\n\r");
    EDMA3_DEBUG_PRINTF("*                                                             *\n\r");
    EDMA3_DEBUG_PRINTF("*                     TI EDMA3 LOW LEVEL DRIVER               *\n\r");
    EDMA3_DEBUG_PRINTF("*                                                             *\n\r");
    EDMA3_DEBUG_PRINTF("*                                                             *\n\r");
    EDMA3_DEBUG_PRINTF("*       For issues on TI EDMA3 LLD, contact TII PSP Team      *\n\r");
    EDMA3_DEBUG_PRINTF("*                                                             *\n\r");
    EDMA3_DEBUG_PRINTF("*                                                             *\n\r");
    EDMA3_DEBUG_PRINTF("*                                                             *\n\r");
    EDMA3_DEBUG_PRINTF("***************************************************************\n\r");
    EDMA3_DEBUG_PRINTF("\r\n\r\n");
    }



void echo()
    {
    EDMA3_DRV_Result edmaResult = EDMA3_DRV_SOK;

    /* Print the Welcome Message */
    printWelcomeBanner();

    /* Initialize EDMA3 first */
    edmaResult = edma3init();
    if (edmaResult != EDMA3_DRV_SOK)
        {
        EDMA3_DEBUG_PRINTF("echo: edma3init() FAILED, error code: %d\r\n",
                                        edmaResult);
        }
    else
        {
        EDMA3_DEBUG_PRINTF("echo: edma3init() PASSED\r\n");
        }

    if (edmaResult == EDMA3_DRV_SOK)
        {
        /* Edma Test for memory to memory copy */
        EDMA3_DEBUG_PRINTF("\r\nEDMA3: Starting EDMA3 Test memory to memory copy\r\n");

        edmaResult = edma3MemToMemCpytest();

        if (EDMA3_DRV_SOK != edmaResult)
           {
            /* Report EDMA Error */
            EDMA3_DEBUG_PRINTF("\r\nEDMA3: edma3MemToMemCpytest() failed\r\n");
           }
        else
           {
            EDMA3_DEBUG_PRINTF("\r\nEDMA3: edma3MemToMemCpytest() passed\r\n");
           }

        EDMA3_DEBUG_PRINTF("\r\nEDMA3 : End EDMA3 Test memory to memory copy\r\n\n");
        }

    /* Start the Heart Beat Print */
    tskHeartBit();

    return;
    }



void tskHeartBit()
    {
    static unsigned int counter = 0u;

    while (counter < 0x1000000u)
        {
        TSK_sleep (1000u);
        EDMA3_DEBUG_PRINTF("\r\n\r\n!!! EDMA3 LLD HrtBt %x", counter);
        counter++;
        }
    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -