hazel/include/kernel/pit.h

23 lines
441 B
C
Raw Normal View History

2024-07-01 19:28:45 -04:00
#ifndef HAZEL_PIT_H_
#define HAZEL_PIT_H_
#define PIT_CHAN0_DATA 0x40
#define PIT_CHAN1_DATA 0x41
#define PIT_CHAN2_DATA 0x42
#define PIT_MODE_CMD 0x43
#define PIT_MODE0 0
2024-07-02 15:36:47 -04:00
#define PIT_MODE2 (2<<1)
2024-07-01 19:28:45 -04:00
#define PIT_LOBYTE (1<<4)
#define PIT_LOHIGH (3<<4)
#define PIT_CHAN0 0
2024-07-02 00:46:29 -04:00
#define PIT_FREQUENCY 1193182
2024-07-02 15:36:47 -04:00
#define DESIRED_FREQUENCY 1000
2024-07-02 00:46:29 -04:00
#define DIVISOR (PIT_FREQUENCY/DESIRED_FREQUENCY)
2024-07-01 19:28:45 -04:00
void pit_init(void);
2024-07-07 23:42:44 -04:00
int pit_handler(void);
2024-07-01 19:28:45 -04:00
#endif