From 6fda59fe9b6c6e6f2df1ac18053b937586265e1b Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Wed, 31 Mar 2004 05:08:13 +0000 Subject: 2004-03-31 Ralf Corsepius * clock/ckinit.c, clock/rtc.c, console/inch.c, ide/ide.c, include/bsp.h, startup/bspstart.c, timer/timer.c: Convert to using c99 fixed size types. --- c/src/lib/libbsp/i386/pc386/timer/timer.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'c/src/lib/libbsp/i386/pc386/timer') diff --git a/c/src/lib/libbsp/i386/pc386/timer/timer.c b/c/src/lib/libbsp/i386/pc386/timer/timer.c index 0e0f1d9003..82d7b1401d 100644 --- a/c/src/lib/libbsp/i386/pc386/timer/timer.c +++ b/c/src/lib/libbsp/i386/pc386/timer/timer.c @@ -51,7 +51,7 @@ #define LEAST_VALID 1 /* Don't trust a value lower than this. */ #define SLOW_DOWN_IO 0x80 /* io which does nothing */ -#define TWO_MS (rtems_unsigned32)(2000) /* TWO_MS = 2000us (sic!) */ +#define TWO_MS (uint32_t)(2000) /* TWO_MS = 2000us (sic!) */ #define MSK_NULL_COUNT 0x40 /* bit counter available for reading */ @@ -59,7 +59,7 @@ /*-------------------------------------------------------------------------+ | Global Variables +--------------------------------------------------------------------------*/ -volatile rtems_unsigned32 Ttimer_val; +volatile uint32_t Ttimer_val; rtems_boolean Timer_driver_Find_average_overhead = TRUE; volatile unsigned int fastLoop1ms, slowLoop1ms; @@ -134,12 +134,12 @@ Timer_initialize(void) | Arguments: None. | Returns: Nothing. +--------------------------------------------------------------------------*/ -rtems_unsigned32 +uint32_t Read_timer(void) { - register rtems_unsigned32 total; + register uint32_t total; - total = (rtems_unsigned32)(rdtsc() - Ttimer_val); + total = (uint32_t)(rdtsc() - Ttimer_val); if (Timer_driver_Find_average_overhead) return total; @@ -256,11 +256,11 @@ Timer_initialize(void) | Arguments: None. | Returns: Nothing. +--------------------------------------------------------------------------*/ -rtems_unsigned32 +uint32_t Read_timer(void) { - register rtems_unsigned32 total, clicks; - register rtems_unsigned8 lsb, msb; + register uint32_t total, clicks; + register uint8_t lsb, msb; outport_byte(TIMER_MODE, TIMER_SEL0|TIMER_LATCH); inport_byte(TIMER_CNTR0, lsb); -- cgit v1.2.3