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
fifo.c
Upload User: caisangzi8
Upload Date: 2013-10-25
Package Size: 15756k
Code Size: 1k
Category:
DVD
Development Platform:
C/C++
- #include "config.h"
- #include "regmap.h"
- #include "global.h"
- #include "dma.h"
- #include "fifo.h"
- unsigned FifoGetByte(tFifo *fifo)
- {
- unsigned c = fifo->data[fifo->tail];
- FifoTailAdv(fifo, 1);
- return c;
- }
- unsigned FifoGetWord(tFifo *fifo)
- {
- int t,s;
- BYTE *d;
- unsigned c;
- t = fifo->tail;
- s = fifo->size;
- d = fifo->data;
- c = d[t];
- t = WRAPl(t+1,s);
- c = (c<<8) | d[t];
- fifo->tail = WRAPl(t+1,s);
- return c;
- }
- int FifoDMARead(tFifo *f, int p, int len)
- {
- int i;
- BYTE c;
- for (i=0; i<len; i++)
- {
- c = FifoGetByte(f);
- dma_buf.b[i+p] = c;
- }
- return 0;
- }