Changeset c35e9622 in rtems


Ignore:
Timestamp:
07/24/95 15:43:17 (29 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
3d3a3590
Parents:
2f2a597
Message:

times reported reasonably correctly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/go32/timer/timer.c

    r2f2a597 rc35e9622  
    3636}
    3737#else
     38#define US_PER_ISR  250
    3839extern rtems_isr timerisr();
    3940static rtems_isr_entry Old_Ticker;
     
    8485            continue;
    8586
    86         /* load timer for 250 microsecond period */
     87        /* load timer for US_PER_ISR microsecond period */
    8788        outport_byte( TIMER_MODE, TIMER_SEL0|TIMER_16BIT|TIMER_RATEGEN );
    88         outport_byte( TIMER_CNTR0, US_TO_TICK(250) >> 0 & 0xff );
    89         outport_byte( TIMER_CNTR0, US_TO_TICK(250) >> 8 & 0xff );
     89        outport_byte( TIMER_CNTR0, US_TO_TICK(US_PER_ISR) >> 0 & 0xff );
     90        outport_byte( TIMER_CNTR0, US_TO_TICK(US_PER_ISR) >> 8 & 0xff );
    9091#endif /* PENTIUM */
    9192    }
     
    118119    inport_byte( TIMER_CNTR0, msb );
    119120    clicks = msb << 8 | lsb;
    120     total = Ttimer_val + 250 - TICK_TO_US( clicks );
     121    total = (Ttimer_val * US_PER_ISR) + (US_PER_ISR - TICK_TO_US( clicks ));
    121122#endif /* pentium */
    122123
Note: See TracChangeset for help on using the changeset viewer.