mirror of
https://github.com/86Box/86Box.git
synced 2025-01-22 17:22:25 -05:00
Set PIT constant on PIT init.
This commit is contained in:
parent
2466da2161
commit
4884f8664c
2 changed files with 5 additions and 0 deletions
|
@ -910,6 +910,8 @@ pit_init(const device_t *info)
|
||||||
pit_t *dev = (pit_t *) malloc(sizeof(pit_t));
|
pit_t *dev = (pit_t *) malloc(sizeof(pit_t));
|
||||||
pit_reset(dev);
|
pit_reset(dev);
|
||||||
|
|
||||||
|
pit_set_pit_const(dev, PITCONST);
|
||||||
|
|
||||||
if (!(dev->flags & PIT_PS2) && !(dev->flags & PIT_CUSTOM_CLOCK)) {
|
if (!(dev->flags & PIT_PS2) && !(dev->flags & PIT_CUSTOM_CLOCK)) {
|
||||||
timer_add(&dev->callback_timer, pit_timer_over, (void *) dev, 0);
|
timer_add(&dev->callback_timer, pit_timer_over, (void *) dev, 0);
|
||||||
timer_set_delay_u64(&dev->callback_timer, dev->pit_const >> 1ULL);
|
timer_set_delay_u64(&dev->callback_timer, dev->pit_const >> 1ULL);
|
||||||
|
|
|
@ -696,6 +696,9 @@ static void *
|
||||||
pitf_init(const device_t *info)
|
pitf_init(const device_t *info)
|
||||||
{
|
{
|
||||||
pitf_t *dev = (pitf_t *) malloc(sizeof(pitf_t));
|
pitf_t *dev = (pitf_t *) malloc(sizeof(pitf_t));
|
||||||
|
|
||||||
|
pitf_set_pit_const(dev, PITCONST);
|
||||||
|
|
||||||
pitf_reset(dev);
|
pitf_reset(dev);
|
||||||
|
|
||||||
dev->flags = info->local;
|
dev->flags = info->local;
|
||||||
|
|
Loading…
Reference in a new issue