43 #define PIT_MODE_INTERRUPT_ON_TERMINAL 0 44 #define PIT_MODE_ONE_SHOT 1 45 #define PIT_MODE_RATE_GENERATOR 2 46 #define PIT_MODE_SQUARE_WAVE_GENERATOR 3 47 #define PIT_MODE_SOFTWARE_STROBE 4 48 #define PIT_MODE_HARDWARE_STROBE 5 54 #define PIT_CHANNEL_BASE 0x40 55 #define PIT_CHANNEL0_PORT (PIT_CHANNEL_BASE) 56 #define PIT_CHANNEL1_PORT (PIT_CHANNEL_BASE+1) 57 #define PIT_CHANNEL2_PORT (PIT_CHANNEL_BASE+2) 58 #define PIT_MODE_PORT 0x43 63 #define PIT_INTERNAL 0 68 #define PIT_CONTROL_VALUE(FORMAT, MODE, REGISTER, CHANNEL) \ 69 ((CHANNEL) << 6 | (REGISTER) << 4 | (MODE) << 1 | FORMAT) 71 #define PIT_CHANNEL_COUNT 3 72 #define PIT_FREQUENCY 1193182 void pitSetValue(uint32_t channel, uint32_t mode, uint16_t value)
Internal function to set a value of the PIT.
void pitSetFrequency(uint32_t channel, uint32_t frequency)
Set frequency of the programmable interval timer.