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
pit.c
Package: tizos.rar [view]
Upload User: qddsws
Upload Date: 2022-06-22
Package Size: 723k
Code Size: 1k
Category:
OS Develop
Development Platform:
C/C++
- #include <devices/pit.h>
- void __init_device init_isa_pit (struct device* dev) {
- kprint ("Registered ISA Device:");
- kprint (dev->name);
- kprint (" n");
- int i;
- outportb(PIT_TYPE,0x00);
- unsigned long foo = (CLOCK_TICK_RATE + HERTZ/2) / HERTZ;
- outportb(PIT_TYPE, 0x36); /* comptador 0, LSB primer MSB despr閟, mode 3, binary */
- i=100; /* Petita espera */
- while (i>0) i--;
- i=100;
- /* Carreguem el valor del divisor del comptador 0 */
- outportb(PIT_CHANNEL_0, foo & 0xFF); /* LSB */
- while (i>0) i--;
- outportb(PIT_CHANNEL_0, foo >> 8); /* MSB */
- }