Programmable Interval Timer — Änderungen 9882 → 10594

Zeile 90: Zeile 90:
 
void pit_init(int freq)
 
void pit_init(int freq)
 
{
 
{
−
   freq = 1193182 / freq;
+
   int counter = 1193182 / freq;
 
   outb(0x43, 0x34);
 
   outb(0x43, 0x34);
−
   outb(0x40,freq & 0xFF);
+
   outb(0x40,counter & 0xFF);
−
   outb(0x40,freq >> 8);
+
   outb(0x40,counter >> 8);
 
}
 
}
 
</c>
 
</c>