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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? test.c

?? dsp2407的一個測試程序
?? C
字號:
/*--------------------------------------------------------*/
/*  WQ21ST SOFTWARE	STUDIO.			                  	  */
/*--------------------------------------------------------*/
/*  EVM Test Code Shell 				                  */
/*--------------------------------------------------------*/
/*  file name:	 test.c				                  */
/*  Started on:  08/11/2001    by: WQ 			          */
/*  Last update: 08/27/2001    by: WQ				      */
/*--------------------------------------------------------*/

/*--------------------------------------------------------*/
/* test run flags					                      */
/*--------------------------------------------------------*/

#include "tst_main.h"
#include "run_test.h"
#include "sys2407.h"
#include "prot2407.h"
#include "ioreg.h"




#define LOOP_CNT       1   /* 1-n, or -1 = forever */

unsigned int test1_exec;  /* you need one for each test,!=0=run, 0=no */
unsigned int test2_exec;
unsigned int test3_exec;
unsigned int test4_exec;
unsigned int test5_exec;
unsigned int test6_exec;
unsigned int test7_exec;


/*
  declarations for external test routines
*/
/*unsigned int memtest1(void);	 */ /* data space test */
/*unsigned int memtest2(void);	 */ /* code space test */
/*unsigned int uart1test(void);  */ /* onchip uart test */
/*unsigned int led2test(void);	 */ /* led test */
/*unsigned int ti_led_test(void);*/ /* led test */
/*unsigned int dactest(void);	 */ /* dac test */

unsigned int error_code;     /* ms byte = main test #, ls byte = error code */
unsigned int halt_on_error;
unsigned int print_on_error;
unsigned int led_error_code;
unsigned int print_header;

volatile unsigned int configdata;

void set_wait(void);

void set_wait(void)
{

  configdata =	IOWSB1+DSWSB1+PSWSB1; 	 /* 2 waits for off chip I/O */
  OUTMAC( _WSGR, configdata);
}



void set_system(void)
{
  unsigned int SCSR1_Data;

  SCSR1_Data = *(volatile unsigned int*)SCSR1;

  SCSR1_Data |= (ADC_CLKEN | SCI_CLKEN | SPI_CLKEN | CAN_CLKEN | EVB_CLKEN | EVA_CLKEN);

  *(volatile unsigned int*)SCSR1 = SCSR1_Data;



}


void bad_trap(void);
void bad_trap(void)
{
  while(1);                     /* a place to hang if illegal trap */
}

void test_init(void);
void test_init(void)
{
  test1_exec = TEST1;  /* data space ram test,run test if !=0, no if 0 */
  test2_exec = TEST2;  /* code space ram test,run test if !=0, no if 0 */
  test3_exec = TEST3;  /* onchip uart test,run test if !=0, no if 0 */
  test4_exec = TEST4;  /* dac test, run test if !=0, no if 0 */
  test5_exec = TEST5;  /* led test, run test if !=0, no if 0 */
  test6_exec = TEST6;  /* ti led test, run test if !=0, no if 0 */
  test7_exec = TEST7;  /* ti switch, run test if !=0, no if 0 */

  error_code = 0;               /* show no error */
  halt_on_error = 1;            /* stop if error occurred */
  print_on_error = 0;           /* do not print error info to uart */
  led_error_code = 0;           /* don't put on leds */
  print_header = 0;             /* do not print header info to uart */

  set_wait();                   /* set up wait states for I/O */

  set_system();

  set_pll();


}

void error_process(unsigned int);
void error_process(unsigned int bad_code)
{
  error_code = bad_code;          /* put in global location */
  if (print_on_error)             /* print msg to uart ? */
  {
  }
  if (led_error_code)             /* put error code on leds ? */
  {
  }
}

void main(void)
{
  int loop_var,i;
  unsigned int error_state, test_num;

  test_init();                           /* init variables & hardware */
  
  for (i=1 ; i<=4 ; i++)
   {
     ti_led_off(i);
   
   }   
  if (LOOP_CNT)
  {
    loop_var = LOOP_CNT;
    while (loop_var--)
    {
      test_num = 1;                      /* init the test num */
                                         /* start of a test1 section */
      if (test1_exec)
      {
        error_state = 0;                 /* clear the error */
        error_state = memtest1();        /* execute the test */
        if (error_state)                 /* did we get an error */
        {
          error_state |= (test_num * 256);  /* fold in the test # */
          error_process(error_state);    /* go process the error */
          if (halt_on_error)
          {
            goto data_ram_fail;          /* force table exit */
          }                              /* end of halt on error */
        }                                /* end of error */
      }                                  /* end of test1_exec != 0 */

      test_num++;                        /* inc the test num */
      if (test2_exec)
      {
        error_state = 0;                 /* clear the error */
        error_state = memtest2();        /* execute the test */
        if (error_state)                 /* did we get an error */
        {
          error_state |= (test_num * 256);  /* fold in the test # */
          error_process(error_state);    /* go process the error */
          if (halt_on_error)
          {
            goto prog_ram_fail;           /* force table exit */
          }                              /* end of halt on error */
        }                                /* end of error */
      }                                  /* end of test2_exec != 0 */

      test_num++;                        /* inc the test num */
      if (test3_exec)                 
      {                               
        error_state = 0;                 /* clear the error */

	error_state = uart1test();	 /* execute the test */

        if (error_state)                 /* did we get an error */
        {                             
          error_state |= (test_num * 256);  /* fold in the test # */
          error_process(error_state);    /* go process the error */
          if (halt_on_error)          
          {                           
            goto onchip_uart_fail;           /* force table exit */
          }                              /* end of halt on error */
        }                                /* end of error */
      }                                  /* end of test3_exec != 0 */

      test_num++;                        /* inc the test num */
     



      if (test4_exec)
      {
        error_state = 0;                 /* clear the error */
        error_state = dactest();         /* execute the test */
        if (error_state)                 /* did we get an error */
        {
          error_state |= (test_num * 256);  /* fold in the test # */
          error_process(error_state);    /* go process the error */
          if (halt_on_error)
          {
            goto dac_fail;               /* force table exit */
          }                              /* end of halt on error */
        }                                /* end of error */
      }                                  /* end of test5_exec != 0 */
 
      test_num++;                        /* inc the test num */
      if (test5_exec)
      {
        error_state = 0;                 /* clear the error */
        error_state = led2test();        /* execute the test */
        if (error_state)                 /* did we get an error */
        {
          error_state |= (test_num * 256);  /* fold in the test # */
          error_process(error_state);    /* go process the error */
          if (halt_on_error)
          {
            goto led_fail;               /* force table exit */
          }                              /* end of halt on error */
        }                                /* end of error */
      }                                  /* end of test6_exec != 0 */

      test_num++;                        /* inc the test num */
      if (test6_exec)
      {
        error_state = 0;                 /* clear the error */
        error_state = ti_led_test();     /* execute the test */
        if (error_state)                 /* did we get an error */
        {
          error_state |= (test_num * 256);  /* fold in the test # */
          error_process(error_state);    /* go process the error */
          if (halt_on_error)
          {
            goto ti_led_fail;            /* force table exit */
          }                              /* end of halt on error */
        }                                /* end of error */
      }                                  /* end of test7_exec != 0 */
      wait_ms(500);
      test_num++;                        /* inc the test num */
      if (test7_exec)
      {
        error_state = 0;                 /* clear the error */
        error_state = ti_sw_test();      /* execute the test */
        if (error_state)                 /* did we get an error */
        {
          error_state |= (test_num * 256);  /* fold in the test # */
          error_process(error_state);    /* go process the error */
          if (halt_on_error)
          {
            goto ti_sw_fail;             /* force table exit */
          }                              /* end of halt on error */
        }                                /* end of error */
      }                                  /* end of test8_exec != 0 */
    }                                    /* end of loop */
  }                                      /* end of loop cnt >= 0 */
  else
  {
    while (1)
    {
                                         /* start of a test section */
    }                                    /* end of forever */
  }                
  
good_finish:  
  ti_led_on(1);
  ti_led_on(4);
  wait_ms(500);
  ti_led_off(4);
  ti_led_off(1);
  wait_ms(500);

  goto good_finish;  

data_ram_fail: 
  ti_led_on(1);
  wait_ms(500);
  ti_led_off(1);
  wait_ms(500);
  
  goto data_ram_fail;

prog_ram_fail:

  ti_led_on(2);
  wait_ms(500);
  ti_led_off(2);
  wait_ms(500);
  goto prog_ram_fail;

onchip_uart_fail: 
  ti_led_on(3);
  wait_ms(500);
  ti_led_off(3);
  wait_ms(500);
  goto onchip_uart_fail;

dac_fail:
  ti_led_on(4);
  wait_ms(500);
  ti_led_off(4);
  wait_ms(500);
  
  goto dac_fail;

led_fail:
  goto led_fail;

ti_led_fail:
  goto ti_led_fail;

ti_sw_fail:
  goto ti_sw_fail;



}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色av成人天堂桃色av| a4yy欧美一区二区三区| 亚洲午夜一区二区三区| 亚洲欧洲www| 亚洲色图视频免费播放| 亚洲欧洲国产日韩| 亚洲视频一区在线观看| 国产精品国产精品国产专区不蜜| 中文字幕欧美国产| 国产精品久久久久婷婷| 日韩一区中文字幕| 亚洲精品日日夜夜| 亚洲香蕉伊在人在线观| 天天影视色香欲综合网老头| 日韩国产高清在线| 蜜桃在线一区二区三区| 亚洲色图在线播放| 亚洲免费在线观看| 国产aⅴ精品一区二区三区色成熟| 国内精品视频666| 国产精品99精品久久免费| 国产成人av电影在线播放| 成人av小说网| 欧美制服丝袜第一页| 欧美精品v日韩精品v韩国精品v| 欧美久久久久久蜜桃| 精品久久久久久亚洲综合网| 国产亚洲欧美日韩俺去了| 国产精品免费免费| 一区二区三区高清在线| 日韩av成人高清| 国产一区二区导航在线播放| av中文字幕在线不卡| 欧美视频你懂的| 欧美大片日本大片免费观看| 久久精品视频免费| 亚洲激情在线激情| 麻豆精品一区二区三区| 成人美女在线观看| 欧美三级视频在线观看| 精品国产乱码久久久久久1区2区| 国产精品无遮挡| 亚洲一区精品在线| 日韩电影一区二区三区| 日本美女一区二区三区视频| 老司机免费视频一区二区| 粉嫩欧美一区二区三区高清影视| 亚洲男人的天堂在线观看| 三级欧美韩日大片在线看| 国产麻豆精品在线| 色吊一区二区三区| 精品成人在线观看| 亚洲视频在线观看一区| 免费在线观看日韩欧美| 成人午夜激情视频| 欧美一区二区三区在线视频| 国产欧美日韩三级| 婷婷丁香激情综合| 国产高清成人在线| 欧美综合色免费| 国产日产欧美一区二区三区| 亚洲一区影音先锋| 国产aⅴ综合色| 欧美一区二区成人6969| 五月综合激情日本mⅴ| 国产乱人伦偷精品视频免下载| 色哟哟一区二区| 久久久精品人体av艺术| 日韩精品一卡二卡三卡四卡无卡| 欧美日韩成人高清| 日本一区二区三区高清不卡| 日日嗨av一区二区三区四区| 91免费看片在线观看| 久久人人超碰精品| 免费成人在线观看| 欧美亚男人的天堂| 成人欧美一区二区三区| 国产精品一二三四五| 日韩欧美另类在线| 午夜精品久久久久影视| 94-欧美-setu| 国产精品天干天干在观线| 极品少妇xxxx偷拍精品少妇| 欧美日本视频在线| 亚洲精品成人a在线观看| 成人中文字幕在线| 久久久国产精品麻豆| 麻豆91在线播放免费| 欧美丰满嫩嫩电影| 亚洲国产另类精品专区| 在线免费观看视频一区| 亚洲欧洲美洲综合色网| 国产91精品一区二区| 久久久久久电影| 国产精品一品二品| 久久午夜国产精品| 国产一区二区福利视频| 久久久影视传媒| 激情伊人五月天久久综合| 日韩一级成人av| 六月丁香综合在线视频| 一区二区三区加勒比av| 在线观看免费成人| 亚洲一区二区三区视频在线播放 | 亚洲一级二级在线| 日本高清不卡aⅴ免费网站| ...av二区三区久久精品| 99在线精品免费| 亚洲三级免费电影| 91农村精品一区二区在线| 亚洲精品国产无套在线观| 91黄色激情网站| 亚洲一区二区三区影院| 欧美日韩在线综合| 免费成人小视频| 久久久久国产精品厨房| 成人免费看片app下载| 国产精品国产三级国产有无不卡 | 丝瓜av网站精品一区二区| 欧美精品乱人伦久久久久久| 日欧美一区二区| 亚洲精品在线一区二区| 春色校园综合激情亚洲| 亚洲另类中文字| 欧美日韩一区 二区 三区 久久精品| 亚洲h在线观看| 亚洲成人你懂的| 91官网在线免费观看| 亚洲国产成人av| 欧美一区二区三区成人| 美女高潮久久久| 久久蜜桃一区二区| 成人精品视频.| 一区二区三区在线播| 欧美精品一卡两卡| 国产一区二区在线影院| 中文字幕视频一区二区三区久| 在线免费精品视频| 久久99久久久欧美国产| 国产精品久久二区二区| 欧美色国产精品| 精品在线一区二区三区| **性色生活片久久毛片| 欧美理论片在线| 国产乱子轮精品视频| 亚洲欧美日韩国产手机在线| 欧美理论片在线| 成人禁用看黄a在线| 亚洲图片欧美色图| 久久亚洲精精品中文字幕早川悠里| 91麻豆国产福利精品| 精品免费99久久| 91福利视频在线| 国产精品综合网| 亚洲电影激情视频网站| 久久久综合九色合综国产精品| 欧美亚洲高清一区二区三区不卡| 精品一区二区影视| 一区二区三区免费网站| wwwwxxxxx欧美| 欧美性欧美巨大黑白大战| 国内一区二区视频| 亚洲一区二区av电影| 欧美精品一区二区高清在线观看| 色欧美片视频在线观看在线视频| 蜜臀av国产精品久久久久| 亚洲免费电影在线| 久久九九久久九九| 欧美一区二区免费视频| 91在线视频18| 国内精品久久久久影院色| 亚洲国产综合在线| 自拍偷拍亚洲欧美日韩| 精品sm捆绑视频| 欧美精品777| 色综合久久六月婷婷中文字幕| 精品一二线国产| 日韩激情一二三区| 亚洲精品五月天| 国产精品久久久久9999吃药| 国产精品污www在线观看| 欧美xxxxx裸体时装秀| 欧美日韩亚州综合| 色女孩综合影院| 成人成人成人在线视频| 美国三级日本三级久久99| 亚洲一区二区在线免费观看视频| 国产精品久久久久一区二区三区 | 欧美在线三级电影| 成人动漫一区二区三区| 国产精品一区二区在线观看网站| 日韩精品乱码免费| 亚洲自拍偷拍网站| 亚洲人成精品久久久久| 中文字幕成人av| 国产精品污www在线观看| 国产人伦精品一区二区| 久久先锋资源网| 久久久久久久综合狠狠综合| 精品久久国产字幕高潮|