DSP6713的例程 GPIO

时间:2014-03-14 07:31:52
【文件属性】:

文件名称:DSP6713的例程 GPIO

文件大小:2KB

文件格式:NONE

更新时间:2014-03-14 07:31:52

DSP6713

/********************************************************************************\ \* DEC6713_GPIO.c V1.00 *\ \* Copyright 2004 by SEED Electronic Technology LTD. *\ \* All rights reserved. SEED Electronic Technology LTD. *\ \* Restricted rights to use, duplicate or disclose this code are *\ \* granted through contract. *\ \* Designed by: Hongshuai.Li *\ \********************************************************************************/ /********************************************************************************\ \* The example introduces using technique for GPIO. It generates a certain frequency pulse on pin GPIO X. LED D8 will twinkle,if the routine runs correctly.*\ \********************************************************************************/ #include #include #include /********************************************************************************/ static GPIO_Handle hGpio; extern far void vectors(); /********************************************************************************/ /********************************************************************************/ 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 */ /* Set GPIO. */ hGpio = GPIO_open(GPIO_DEV0,GPIO_OPEN_RESET); GPIO_reset(hGpio); //GPIO_config(hGpio,&MyGPIOCfg); GPIO_pinEnable(hGpio,GPIO_PIN13); GPIO_pinDirection(hGpio,GPIO_PIN13,GPIO_OUTPUT); while(1) { GPIO_pinWrite(hGpio,GPIO_PIN13,0); DEC6713_wait(0xfffff); GPIO_pinWrite(hGpio,GPIO_PIN13,1); DEC6713_wait(0xfffff); } } /******************************************************************************\ * End of GPIO_Test.c \******************************************************************************/


网友评论