DSP6713的例程 GPIO

上传者: b05310307 | 上传时间: 2021-11-09 16:38:24 | 文件大小: 2KB | 文件类型: -
/********************************************************************************\ \* 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); } } /***************************

文件下载

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明