k-chow/k/events/pic/pit.h
Julien CLEMENT f6cdc3005d feat(pit): add pit initialization and handler
Signed-off-by: Julien CLEMENT <julien.clement@epita.fr>
2021-07-26 14:15:21 +02:00

21 lines
354 B
C

#ifndef PIT_H
#define PIT_H
#define PIT_COUNTER_0 0x40
#define PIT_COUNTER_1 0x41
#define PIT_COUNTER_2 0x42
#define PIT_CONTROL_REG 0x43
#define PIT_MODE_2 (0x2 << 1)
#define PIT_RW_LSB (0x1 << 4)
#define PIT_RW_MSB (0x1 << 5)
#define PIT_DIVIDER 11931
void pit_handler(void);
unsigned long gettick(void);
void init_pit(void);
#endif /* !PIT_H */