Test initialisation of MUIA_List_AdjustWidth and MUIA_List_AdjustHeight, and
[AROS.git] / arch / all-pc / kernel / kernel_timer.h
bloba919588a5e0af68caf325f17ce0273c39ca9fe31
1 #include <hardware/pit.h>
3 /*
4 * Start up channel 0 in 'terminal count' mode (mode 0).
5 * It will count down to zero, and then will issue a single interrupt,
6 * but we don't care about it since interrupts are neither used nor enabled.
7 * It's safe to use the timer freely here. timer.device starts up long after
8 * this code.
9 */
10 static inline void pit_start(unsigned short start)
12 outb(CH0|ACCESS_FULL|MODE_TERMINAL, PIT_CONTROL);
13 ch_write(start, PIT_CH0);
17 * In this mode the counter wraps around to 0xFFFF and continues decrementing.
18 * It's assumed that the start value is reasonably lower, and the CPU has time
19 * to detect the wraparound.
21 static inline unsigned short pit_wait(unsigned short start)
23 unsigned short tick;
27 outb(CH0|ACCESS_LATCH, PIT_CONTROL);
28 tick = ch_read(PIT_CH0);
29 } while ((tick > 0) && (tick < start));
31 return tick;
34 void pit_udelay(unsigned int usec);