亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? main.c

?? evmDM642的經(jīng)典例程(ccs),初學(xué)者必備
?? C
字號:
/*
 *  Copyright 2003 by Texas Instruments Incorporated.
 *  All rights reserved. Property of Texas Instruments Incorporated.
 *  Restricted rights to use, duplicate or disclose this code are
 *  granted through contract.
 *  
 */
/* "@(#) DSP/BIOS 4.90.270 06-11-03 (barracuda-m10)" */
/*
 *  Copyright 2001 by Texas Instruments Incorporated.
 *  All rights reserved. Property of Texas Instruments Incorporated.
 *  Restricted rights to use, duplicate or disclose this code are
 *  granted through contract.
 *  U.S. Patent Nos. 5,283,900  5,392,448
 */
/* "@(#) DSP/BIOS 4.51.0 05-23-01 (barracuda-i10)" */
/******************************************************************************\
*           Copyright (C) 2000 Texas Instruments Incorporated.
*                           All Rights Reserved
*------------------------------------------------------------------------------
* FILENAME...... main.c
* DATE CREATED.. 10/02/2000
* LAST MODIFIED. 02/02/2002
*------------------------------------------------------------------------------
* This program uses the timers to trigger EDMA events. These events in turn 
* trigger linked EDMA parameter tables to fill a ping pong buffer structure. 
* Set a breakpoint on swiProcessFunc(int arg). Then open two memory windows. 
* Use ping as the address for one memory window and pong for the other. Then 
* run the application. You'll note that the program bounces between the ping 
* and pong buffers filling each with a value that comes from the source. The 
* source in this case is the SDRAM timer control register and it simulates 
* input data.(Note: This example runs with CACHE enable). 
\******************************************************************************/
#include <std.h>
#include <swi.h>
#include <log.h>
#include <clk.h>

#include <csl.h>
#include <csl_cache.h>
#include <csl_edma.h>
#include <csl_timer.h>
#include <csl_irq.h>

/*----------------------------------------------------------------------------*/

/* declare DSP/BIOS objects created with the configuration tool */
extern far SWI_Obj SwiMain;
extern far LOG_Obj LogMain;
extern far SWI_Obj swiProcess;
extern far LOG_Obj trace;

/* Pick which EDMA transfer completion interrupt we want to use */
#define TCCINTNUM   10

/* define some constants */
#define BUFF_SZ  256              /* ping-pong buffer sizes in # of ints  */
#define FCPU     150000000        /* CPU clock frequency                  */
#define SRATE    8000             /* data sample rate (simulated w/timer  */
#define TPRD     (FCPU/(4*SRATE)) /* timer period                         */

/* Create the buffers. We want to align the buffers to be cache friendly */
/* by aligning them on an L2 cache line boundary.                        */
#pragma DATA_ALIGN(ping,128);
#pragma DATA_ALIGN(pong,128);
#pragma DATA_ALIGN(outbuff,128);
int ping[BUFF_SZ];
int pong[BUFF_SZ];
int outbuff[BUFF_SZ];

/* These two variables serve as the data sources for this example. */
/* Also want to align these on a cache line boundary since they    */
/* sources of EDMA transfers.                                      */
#pragma DATA_ALIGN(ping_data,128);
#pragma DATA_ALIGN(pong_data,128);
static int ping_data;
static int pong_data;

/* global variable used to track the ping-pong'ing */
static int pingpong = 0;

/* declare some CSL objects */
TIMER_Handle hTimer;   /* Handle for the timer device                 */
EDMA_Handle hEdma;     /* Handle for the EDMA channel                 */
EDMA_Handle hEdmaPing; /* Handle for the ping EDMA reload parameters  */
EDMA_Handle hEdmaPong; /* Handle for the pong EDMA reload parameters  */
EDMA_Config cfgEdma;   /* EDMA configuration structure                */

/* Create the EDMA configuration structure for ping transfers */
EDMA_Config cfgEdmaPing = {  
  EDMA_OPT_RMK(
    EDMA_OPT_PRI_LOW,
    EDMA_OPT_ESIZE_32BIT,
    EDMA_OPT_2DS_NO,
    EDMA_OPT_SUM_NONE,
    EDMA_OPT_2DD_NO,
    EDMA_OPT_DUM_INC,
    EDMA_OPT_TCINT_YES,
    EDMA_OPT_TCC_OF(TCCINTNUM),
    EDMA_OPT_TCCM_OF(0),
    EDMA_OPT_ATCINT_NO,
    EDMA_OPT_ATCC_OF(0),
    EDMA_OPT_PDTS_DEFAULT,
    EDMA_OPT_PDTD_DEFAULT,
    EDMA_OPT_LINK_YES,
    EDMA_OPT_FS_NO
  ),
  EDMA_SRC_OF(&ping_data),
  EDMA_CNT_OF(BUFF_SZ),
  EDMA_DST_OF(ping),
  EDMA_IDX_OF(0x00000004),
  EDMA_RLD_OF(0x00000000)
};                         

/* Create the EDMA configuration structure for pong transfers */
EDMA_Config cfgEdmaPong = {
  EDMA_OPT_RMK(
    EDMA_OPT_PRI_LOW,
    EDMA_OPT_ESIZE_32BIT,
    EDMA_OPT_2DS_NO,
    EDMA_OPT_SUM_NONE,
    EDMA_OPT_2DD_NO,
    EDMA_OPT_DUM_INC,
    EDMA_OPT_TCINT_YES,
    EDMA_OPT_TCC_OF(TCCINTNUM),
    EDMA_OPT_TCCM_OF(0),
    EDMA_OPT_ATCINT_NO,
    EDMA_OPT_ATCC_OF(0),
    EDMA_OPT_PDTS_DEFAULT,
    EDMA_OPT_PDTD_DEFAULT,
    EDMA_OPT_LINK_YES,
    EDMA_OPT_FS_NO
  ),
  EDMA_SRC_OF(&pong_data),
  EDMA_CNT_OF(BUFF_SZ),
  EDMA_DST_OF(pong),
  EDMA_IDX_OF(0x00000004),
  EDMA_RLD_OF(0x00000000)
};                         
 
    
/*----------------------------------------------------------------------------*/
void main(){

  /* initialize the CSL library */
  CSL_init();

  /* initialize the input source data */
  ping_data=0x00000000;
  pong_data=0x80000000;
  
  /* Since these variables are the source of an EDMA transfer, we     */
  /* need to flush them out of the cache since we just wrote to them. */
  CACHE_flush(CACHE_L2,&ping_data,1);
  CACHE_flush(CACHE_L2,&pong_data,1);

  /* Let's disable/clear related interrupts just in case they are pending */
  /* fram a previous run of the program.                                  */  
  IRQ_reset(IRQ_EVT_EDMAINT);
  EDMA_intDisable(TCCINTNUM);
  EDMA_intClear(TCCINTNUM);
  
  /* Although not required, let's clear all of the EDMA parameter RAM. */
  /* This makes it easier to view the RAM and see the changes as we    */
  /* configure it.                                                     */
  EDMA_clearPram(0x00000000);
   
  /* Let's open up a timer device, we'll use this to simulate input events */
  /* at a gien sample rate.                                                */
  hTimer = TIMER_open(TIMER_DEV1, TIMER_OPEN_RESET);

  /* Lets open up the EDMA channel associated with timer #1. */
  hEdma = EDMA_open(EDMA_CHA_TINT1, EDMA_OPEN_RESET);

  /* We also need two EDMA reload parameter sets so let's allocate them */
  /* here. Notice the -1, this means allocate any availale tale.        */
  hEdmaPing = EDMA_allocTable(-1);
  hEdmaPong = EDMA_allocTable(-1);

  /* Let's copy the ping reload configuration structure to an */
  /* intermediate configuration structure.                    */
  cfgEdma = cfgEdmaPing;
  
  /* Let's initialize the link fields of the configuration structures */
  cfgEdmaPing.rld = EDMA_RLD_RMK(0,hEdmaPing);
  cfgEdmaPong.rld = EDMA_RLD_RMK(0,hEdmaPong);
  cfgEdma.rld     = EDMA_RLD_RMK(0,hEdmaPong);

  /* Now let's program up the EDMA channel with the configuration structure */
  EDMA_config(hEdma, &cfgEdma);   
  
  /* Let's also configure the reload parameter tables in the EDMA PRAM */
  /* with the values in the configuration structures.                  */
  EDMA_config(hEdmaPing, &cfgEdmaPing);
  EDMA_config(hEdmaPong, &cfgEdmaPong);   

  /* Configure up the timer. */
  TIMER_configArgs(hTimer, 
    TIMER_CTL_OF(0x00000200), 
    TIMER_PRD_OF(TPRD), 
    TIMER_CNT_OF(0)
  );   

  /* Enable the related interrupts */
  IRQ_enable(IRQ_EVT_EDMAINT);
  EDMA_intEnable(TCCINTNUM);        
  
  /* Enable the EDMA channel */
  EDMA_enableChannel(hEdma);   
  
  /* Finally, enable the timer which will drive everything. */
  TIMER_start(hTimer);
}

/*----------------------------------------------------------------------------*/
void swiProcessFunc(int arg){

  int *inbuff;
  int x;

  if (pingpong){

    /* If pingpong is 0, then we own the ping input buffer */
    inbuff = ping;
    LOG_printf(&trace,"Ping");
    
  }else{

    /* If pingpong is 1, then we own the pong input buffer */
    inbuff = pong;
    LOG_printf(&trace,"Pong");

  }  

  /* Now let's process the input buffer, for simplicity, we'll */
  /* just copy it to the output buffer.                        */
  for (x=0; x<BUFF_SZ; x++) {
    outbuff[x] = inbuff[x];
  }

  /* If this example is enhanced to actually do something with the  */
  /* output buffer such as DMA it somewhere, you will want to flush */
  /* it out of the cache first.                                     */
  CACHE_flush(CACHE_L2,outbuff,BUFF_SZ);
  
  /* Since we're done processing the input buffer, clean it from cache, */
  /* this invalidates it from cache to ensure we read a fresh version   */
  /* the next time.                                                     */
  CACHE_clean(CACHE_L2,inbuff,BUFF_SZ);
}

/*----------------------------------------------------------------------------*/
void hwiEdmaIsr(int arg){
  
  /* Clear the pending interrupt from the EDMA interrupt pending register */
  EDMA_intClear(TCCINTNUM);
  
  /* Perform ping-pong */
  pingpong = (pingpong + 1) & 1;

  /* Based on if we ping'ed or pong'ed, we need to set the EDMA channel */
  /* link address for the NEXT frame.                                   */
  
  if (pingpong){
    /* Currently doing pong so setup next frame for ping */                     
  
    /* Modify the input data source, this just simulates */
    /* the input data changing.                          */
    ping_data++;

    /* Rememer to flush this variable out of the cache */
    /* since it's the source of an EDMA transfer       */
    CACHE_flush(CACHE_L2,&ping_data,1); 

    /* Now filling pong so set link to ping */
    EDMA_link(hEdma,hEdmaPing);
    
  }else{
    /* Currently doing ping so setup next frame for pong */                     
  
    /* Modify the output data source, this just simulates */
    /* the input data changing.                           */
    pong_data++;
    
    /* Rememer to flush this variable out of the cache */
    /* since it's the source of an EDMA transfer       */
    CACHE_flush(CACHE_L2,&pong_data,1);

    /* Now filling ping so set link to pong */
    EDMA_link(hEdma,hEdmaPong);
    
  }  
 
  /* Notify the app that we just ping-pong'ed */
  SWI_post(&swiProcess);
}

/*----------------------------------------------------------------------------*/

/******************************************************************************\
* End of main.c
\******************************************************************************/
                                                                                

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美嫩在线观看| 亚洲区小说区图片区qvod| 久久蜜桃一区二区| 国产 欧美在线| 午夜a成v人精品| 国产精品二三区| 欧美成人精精品一区二区频| 一本大道综合伊人精品热热| 国产一区二区三区av电影| 亚洲国产欧美另类丝袜| 中国色在线观看另类| 精品福利在线导航| 555www色欧美视频| 欧美日韩在线播放三区| 99精品桃花视频在线观看| 国产美女娇喘av呻吟久久| 日本伊人色综合网| 亚洲成人中文在线| 一区二区高清在线| 亚洲另类春色国产| 亚洲欧洲精品成人久久奇米网| 精品国产乱码久久久久久久| 欧美精品在线一区二区| 在线视频你懂得一区二区三区| 成人性生交大片免费看中文| 国产一区二区伦理片| 国内精品视频一区二区三区八戒| 秋霞午夜鲁丝一区二区老狼| 91精品国产高清一区二区三区蜜臀 | 精品久久国产老人久久综合| 亚洲国产欧美另类丝袜| 欧美福利视频一区| 粉嫩av亚洲一区二区图片| 亚洲伦在线观看| 欧美日韩国产高清一区| 国产美女精品一区二区三区| 蜜桃av一区二区三区| 欧美日本一区二区| 国产伦精一区二区三区| 精品一区二区三区蜜桃| 精品一区二区影视| 国产在线精品不卡| 国产剧情av麻豆香蕉精品| 另类小说视频一区二区| 老司机精品视频一区二区三区| 奇米四色…亚洲| 国产在线播放一区三区四| 国产盗摄视频一区二区三区| 国产99久久精品| av亚洲产国偷v产偷v自拍| 99r国产精品| 欧美系列亚洲系列| 91精品国产综合久久久蜜臀粉嫩 | 成a人片亚洲日本久久| 国产99久久久久| 99国产精品一区| 在线观看免费成人| 91麻豆精品国产91| 2021中文字幕一区亚洲| 国产精品传媒视频| 天天色 色综合| 狠狠色综合色综合网络| av成人免费在线观看| 欧美在线制服丝袜| 日韩欧美电影一区| 国产精品久久久久久妇女6080| 一区二区三区在线视频观看58 | caoporn国产精品| 色欧美片视频在线观看在线视频| 欧美撒尿777hd撒尿| 日韩精品在线一区| 国产精品初高中害羞小美女文| 亚洲午夜在线观看视频在线| 激情五月激情综合网| 色婷婷综合久久久| 日韩一区二区在线观看视频 | 欧美午夜精品理论片a级按摩| 欧美一区二区三级| 国产精品久久久久久亚洲毛片| 亚洲第一激情av| 国产精品中文字幕欧美| 在线观看视频一区二区| 精品精品国产高清a毛片牛牛| 一区二区三区成人在线视频| 婷婷综合在线观看| 欧美视频精品在线观看| 欧美一区二区在线免费播放| 精品成人一区二区三区| 亚洲日本免费电影| 国产成人福利片| 9i看片成人免费高清| 一本一道久久a久久精品| 欧美一级午夜免费电影| 亚洲欧美一区二区三区久本道91| 成人国产精品免费观看| 国内精品视频666| 在线影视一区二区三区| 国产欧美日韩三级| 秋霞电影网一区二区| 91麻豆国产香蕉久久精品| 日韩欧美激情四射| 亚洲一区二区精品3399| 国产成人啪午夜精品网站男同| 欧美日本一区二区三区四区| 国产精品传媒在线| 国产精品一区二区三区乱码| 91麻豆精品国产91久久久使用方法| 国产精品盗摄一区二区三区| 国产最新精品免费| 日韩欧美在线一区二区三区| 亚洲无线码一区二区三区| voyeur盗摄精品| 欧美激情综合五月色丁香小说| 久久99国产精品麻豆| 欧美一级黄色录像| 午夜视频在线观看一区| 在线视频欧美区| 伊人一区二区三区| 97久久精品人人做人人爽 | 欧美一激情一区二区三区| 亚洲一线二线三线视频| 91麻豆国产精品久久| 成人免费一区二区三区视频| 丁香激情综合国产| 久久精品欧美日韩精品| 精品无码三级在线观看视频 | 91精品婷婷国产综合久久性色| 亚洲蜜桃精久久久久久久| 成人av集中营| 国产精品对白交换视频 | av一区二区不卡| 国产精品久久久久久久久快鸭| 丁香五精品蜜臀久久久久99网站| wwwwww.欧美系列| 国产精品自拍网站| 久久久精品日韩欧美| 国产高清不卡二三区| 国产人成一区二区三区影院| 国产成人精品aa毛片| 国产精品成人一区二区三区夜夜夜| 成人午夜av电影| 国产精品久久久久久久久晋中| thepron国产精品| 亚洲精品国产成人久久av盗摄| 丁香桃色午夜亚洲一区二区三区| 日本在线观看不卡视频| 中文字幕欧美一| 色老汉一区二区三区| 久久成人免费日本黄色| 亚洲欧美另类图片小说| 欧美精品一区二区三区在线| 5566中文字幕一区二区电影| 在线免费观看视频一区| 亚洲在线一区二区三区| 国产农村妇女精品| 精品国产一区久久| 欧美日韩美女一区二区| 国产精品毛片无遮挡高清| 欧美国产丝袜视频| 91亚洲精品乱码久久久久久蜜桃| 亚洲精品日韩专区silk| 欧美四级电影网| 久久99国产精品尤物| 中文字幕巨乱亚洲| 欧美午夜寂寞影院| 久草中文综合在线| 17c精品麻豆一区二区免费| 欧美视频你懂的| 国产做a爰片久久毛片| |精品福利一区二区三区| 欧美日韩激情在线| 国产精品白丝jk黑袜喷水| 一区二区三区欧美日| 日韩欧美第一区| jizz一区二区| 日本va欧美va欧美va精品| 国产午夜精品久久久久久免费视 | 91丨porny丨国产入口| 午夜国产精品影院在线观看| 久久久.com| 精品视频一区二区三区免费| 国产剧情一区在线| 亚洲国产毛片aaaaa无费看 | 色哟哟一区二区三区| 免费观看成人av| 亚洲精品综合在线| 精品国产乱码91久久久久久网站| 色综合久久久久网| 国产在线精品不卡| 视频一区欧美精品| 中文字幕中文字幕一区| 精品人在线二区三区| 欧洲精品一区二区三区在线观看| 国产在线一区观看| 亚洲成人一二三| 亚洲欧洲成人精品av97| 精品久久久久久最新网址| 欧美怡红院视频| 成人高清在线视频| 国产精品一卡二卡在线观看|