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
profile.c
Package: src.rar [view]
Upload User: jankzhpno
Upload Date: 2022-08-03
Package Size: 4763k
Code Size: 2k
Category:
Windows CE
Development Platform:
Visual C++
- /**************************************************************
- NAME: profile.c
- DESC: To measuure the USB download speed, the WDT is used.
- To measure up to large time, The WDT interrupt is used.
- HISTORY:
- MAR.25.2002:purnnamu:
- S3C2400X profile.c is ported for S3C2410X.
- **************************************************************/
- #include "def.h"
- #include "option.h"
- #include "2440addr.h"
- #include "2440lib.h"
- #include "2440slib.h"
- #include <stdarg.h>
- #include <string.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include <ctype.h>
- /************************* Timer ********************************/
- static int intCount;
- void __irq IsrWatchdog(void);
- void Timer_InitEx(void)
- {
- intCount=0;
- pISR_WDT_AC97=(U32)IsrWatchdog;
- ClearPending(BIT_WDT_AC97);
- rSUBSRCPND=BIT_SUB_WDT;
- rINTMSK&=~(BIT_WDT_AC97);
- rINTSUBMSK&=~(BIT_SUB_WDT);
- }
- void Timer_StartEx(void)
- {
- int divider=0;
- rWTCON=((PCLK/1000000-1)<<8)|(0<<3)|(1<<2); // 16us
- rWTDAT=0xffff;
- rWTCNT=0xffff;
- // 1/16/(65+1),interrupt enable,reset disable,watchdog enable
- rWTCON=((PCLK/1000000-1)<<8)|(0<<3)|(1<<2)|(0<<0)|(1<<5);
- }
- float Timer_StopEx(void)
- {
- int count;
- rWTCON=((PCLK/1000000-1)<<8);
- rINTMSK|=BIT_WDT_AC97;
- rINTSUBMSK|=BIT_SUB_WDT;
- count=(0xffff-rWTCNT)+(intCount*0xffff);
- return ((float)count*(16e-6));
- }
- void __irq IsrWatchdog(void)
- {
- rINTSUBMSK|=BIT_SUB_WDT;
- rSRCPND = BIT_WDT_AC97; //Clear pending bit
- rINTPND = BIT_WDT_AC97;
- rINTPND; //Prevent an double interrupt pending
- rSUBSRCPND=BIT_SUB_WDT;
- intCount++;
- rINTSUBMSK&=~BIT_SUB_WDT;
- }