Changeset 1690c6b in rtems for c/src/lib/libbsp/i386
- Timestamp:
- 07/21/95 20:10:49 (28 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 2f2a597
- Parents:
- 9e738b65
- Location:
- c/src/lib/libbsp/i386/go32/timer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/i386/go32/timer/timer.c
r9e738b65 r1690c6b 41 41 #else /* pentium */ 42 42 rtems_isr timerisr(); 43 44 #define TIMER_ISR_US 10000 45 43 46 #endif /* pentium */ 44 47 … … 75 78 WAIT(); 76 79 77 /* load timer for 250microsecond period */80 /* load timer for TIMER_ISR_US microsecond period */ 78 81 outport_byte( TIMER_MODE, TIMER_SEL0|TIMER_16BIT|TIMER_RATEGEN ); 79 outport_byte( TIMER_CNTR0, US_TO_TICK( 250) >> 0 & 0xff);80 outport_byte( TIMER_CNTR0, US_TO_TICK( 250) >> 8 & 0xff);82 outport_byte( TIMER_CNTR0, US_TO_TICK(TIMER_ISR_US) >> 0 & 0xff); 83 outport_byte( TIMER_CNTR0, US_TO_TICK(TIMER_ISR_US) >> 8 & 0xff); 81 84 } 82 85 … … 102 105 inport_byte( TIMER_CNTR0, msb ); 103 106 clicks = msb << 8 | lsb; 104 total = Ttimer_val + (250- TICK_TO_US( clicks ));107 total = (Ttimer_val * TIMER_ISR_US) + (TIMER_ISR_US - TICK_TO_US( clicks )); 105 108 #endif /* pentium */ 106 109 -
c/src/lib/libbsp/i386/go32/timer/timerisr.s
r9e738b65 r1690c6b 28 28 29 29 SYM (timerisr): 30 addl $ 250,_Ttimer_val # another 250 microseconds30 addl $1,_Ttimer_val # another tick 31 31 push edx 32 32 push eax
Note: See TracChangeset
for help on using the changeset viewer.