COBE 0.1 ALPHA
|
00001 #include <pit.h> 00002 #include <stdint.h> 00003 #include <io.h> 00004 00005 void set_pit_channel(uint8_t chan, uint8_t mode, uint32_t data) { 00006 uint32_t pit_freq = 1193182 / data; 00007 outb(0x43, (chan << 6) | (mode << 1) | 0x30); 00008 outb((0x40 + chan), data); 00009 if(mode == 2) outb((0x40 + chan), pit_freq); 00010 }