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

📄 dec6713_led.c

📁 dsp tms320c6000 boot程序
💻 C
字号:
/********************************************************************************\
\*  DEC6713_GPIO.c	V1.00													    *\

\*  Copyright 2006 by SSD Electronic Technology LTD.                           *\
\*  All rights reserved. SSD Electronic Technology LTD.                        *\
\*  Restricted rights to use, duplicate or disclose this code are               *\
\*  granted through contract.    											    *\
                                             
\*	Designed by: W.Z.H														    *\
\********************************************************************************/
/********************************************************************************\
\*		The example introduces using technique for extend ioport. It generates a certain 
	frequency pulse on pin extend ioport, LED D5 to D12 will twinkle,if the routine runs correctly.*\
\********************************************************************************/

#include <csl.h>
#include <csl_gpio.h>
#include <DEC6713.h>
/********************************************************************************/
Uint8	LedCode[]={0x7F,0xBF,0xDF,0xEF,0xF7,0xFB,0xFD,0xFE,0xFF};
extern far void vectors();
Uint8	i=0;
/********************************************************************************/
/********************************************************************************/
main()
{
	/* Initialize CSL,must when using CSL. */
	CSL_init();
	
	/* Initialize DEC6713 board. */
	DEC6713_init();
	
	IRQ_setVecs(vectors);     /* point to the IRQ vector table	*/
  	IRQ_globalEnable();       /* Globally enable interrupts       */ 
  	IRQ_nmiEnable();          /* Enable NMI interrupt             */	
	
	while(1)
	{
		if (i<9)
		{
			DEC6713_cpld_rset(DEC6713_LED_REG,LedCode[i]);
			DEC6713_wait(0x80000);
			i++;
		}
		else
			i =0;	
	}
}	
/******************************************************************************\
* End of led_Test.c
\******************************************************************************/

⌨️ 快捷键说明

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