Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
uarttest.c
Package: DSP-C6000-DM642DEMO.rar [view]
Upload User: dahaojd
Upload Date: 2008-01-29
Package Size: 14357k
Code Size: 1k
Category:
DSP program
Development Platform:
C/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.
- *
- */
- /* "@(#) DDK 1.10.00.23 07-02-03 (ddk-b12)" */
- /*
- * ======== uarttest.c ========
- */
- #include <std.h>
- #include <log.h>
- #include <gio.h>
- #include <iom.h>
- #ifdef _6x_
- extern far LOG_Obj trace;
- #else
- extern LOG_Obj trace;
- #endif
- /*
- * ======== main ========
- */
- Void main()
- {
- LOG_printf(&trace, "UART Test started!");
- }
- /*
- * ======== echo =========
- */
- Void echo()
- {
- GIO_Handle inChan, outChan;
- Char buf[12] = "Hello World ";
- Uns size = 12;
- Int status;
- inChan = GIO_create("/uart", IOM_INPUT, NULL, NULL, NULL);
- outChan = GIO_create("/uart", IOM_OUTPUT, NULL, NULL, NULL);
- if (inChan == NULL || outChan == NULL) {
- LOG_printf(&trace, "GIO_create failed");
- SYS_abort("GIO_create");
- }
- for (;;) {
- status = GIO_write(outChan, buf, &size);
- if (status < 0) {
- LOG_printf(&trace, "GIO_write error");
- SYS_abort("GIO_write");
- }
- status = GIO_read(inChan, buf, &size);
- if (status < 0) {
- LOG_printf(&trace, "GIO_write error");
- SYS_abort("GIO_read");
- }
- }
- }