From e96a950bcf9953c0c0474fb21ec2af9c260e3668 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Wed, 31 Mar 2004 02:00:03 +0000 Subject: 2004-03-30 Ralf Corsepius * sh7032/clock/ckinit.c, sh7032/delay/delay.c, sh7032/include/ispsh7032.h, sh7032/sci/sci.c, sh7032/score/cpu_asm.c, sh7032/timer/timer.c, sh7045/clock/ckinit.c, sh7045/include/ispsh7045.h, sh7045/sci/sci.c, sh7045/sci/sci_termios.c, sh7045/score/cpu_asm.c, sh7045/timer/timer.c, sh7750/clock/ckinit.c, sh7750/include/rtems/score/ispsh7750.h, sh7750/include/sh/sh4uart.h, sh7750/sci/sh4uart.c, sh7750/score/cpu_asm.c, sh7750/score/ispsh7750.c, sh7750/timer/timer.c: Convert to using c99 fixed size types. --- c/src/lib/libcpu/sh/sh7032/clock/ckinit.c | 22 +++++++++++----------- c/src/lib/libcpu/sh/sh7032/delay/delay.c | 6 +++--- c/src/lib/libcpu/sh/sh7032/include/ispsh7032.h | 2 +- c/src/lib/libcpu/sh/sh7032/sci/sci.c | 12 ++++++------ c/src/lib/libcpu/sh/sh7032/score/cpu_asm.c | 12 ++++++------ c/src/lib/libcpu/sh/sh7032/timer/timer.c | 16 ++++++++-------- 6 files changed, 35 insertions(+), 35 deletions(-) (limited to 'c/src/lib/libcpu/sh/sh7032') diff --git a/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c b/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c index 494dafc78a..9255c4c262 100644 --- a/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c +++ b/c/src/lib/libcpu/sh/sh7032/clock/ckinit.c @@ -103,7 +103,7 @@ static unsigned int sh_clicks_per_tick( #else double fclicks_per_tick = ((double) clicks_per_sec * (double) usec_per_tick) / 1000000.0 ; - return (unsigned32) fclicks_per_tick ; + return (uint32_t ) fclicks_per_tick ; #endif } @@ -119,7 +119,7 @@ static unsigned int sh_clicks_per_tick( * number of clock ticks since the driver was initialized. */ -volatile rtems_unsigned32 Clock_driver_ticks; +volatile uint32_t Clock_driver_ticks; static void Clock_exit( void ); static rtems_isr Clock_isr( rtems_vector_number vector ); @@ -132,8 +132,8 @@ static rtems_isr Clock_isr( rtems_vector_number vector ); * has passed. */ -rtems_unsigned32 Clock_isrs; /* ISRs until next tick */ -static rtems_unsigned32 Clock_isrs_const; /* only calculated once */ +uint32_t Clock_isrs; /* ISRs until next tick */ +static uint32_t Clock_isrs_const; /* only calculated once */ /* * These are set by clock driver during its init @@ -164,7 +164,7 @@ rtems_isr Clock_isr( * * perform any timer dependent tasks */ - unsigned8 temp; + uint8_t temp; /* reset the flags of the status register */ temp = read8( ITU_TSR0) & ITU_STAT_MASK; @@ -194,10 +194,10 @@ void Install_clock( rtems_isr_entry clock_isr ) { - unsigned8 temp8 = 0; - unsigned32 microseconds_per_tick ; - unsigned32 cclicks_per_tick ; - unsigned16 Clock_limit ; + uint8_t temp8 = 0; + uint32_t microseconds_per_tick ; + uint32_t cclicks_per_tick ; + uint16_t Clock_limit ; /* * Initialize the clock tick device driver variables @@ -280,7 +280,7 @@ void Install_clock( void Clock_exit( void ) { - unsigned8 temp8 = 0; + uint8_t temp8 = 0; /* turn off the timer interrupts */ /* set interrupt priority to 0 */ @@ -329,7 +329,7 @@ rtems_device_driver Clock_control( void *pargp ) { - rtems_unsigned32 isrlevel; + uint32_t isrlevel; rtems_libio_ioctl_args_t *args = pargp; if (args != 0) diff --git a/c/src/lib/libcpu/sh/sh7032/delay/delay.c b/c/src/lib/libcpu/sh/sh7032/delay/delay.c index 71c8d3d1a3..3f00e8a388 100644 --- a/c/src/lib/libcpu/sh/sh7032/delay/delay.c +++ b/c/src/lib/libcpu/sh/sh7032/delay/delay.c @@ -36,11 +36,11 @@ * => 4 * 5e-8 secs per delay loop */ -void CPU_delay( unsigned32 microseconds ) +void CPU_delay( uint32_t microseconds ) { - register unsigned32 clicks_per_usec = + register uint32_t clicks_per_usec = rtems_cpu_configuration_get_clicks_per_second() / 1000000 ; - register unsigned32 _delay = + register uint32_t _delay = (microseconds) * (clicks_per_usec); asm volatile ( "0: add #-4,%0\n\ diff --git a/c/src/lib/libcpu/sh/sh7032/include/ispsh7032.h b/c/src/lib/libcpu/sh/sh7032/include/ispsh7032.h index 336f3874d8..9093b6ded5 100644 --- a/c/src/lib/libcpu/sh/sh7032/include/ispsh7032.h +++ b/c/src/lib/libcpu/sh/sh7032/include/ispsh7032.h @@ -31,7 +31,7 @@ extern "C" { #include -extern void __ISR_Handler( unsigned32 vector ); +extern void __ISR_Handler( uint32_t vector ); /* diff --git a/c/src/lib/libcpu/sh/sh7032/sci/sci.c b/c/src/lib/libcpu/sh/sh7032/sci/sci.c index ca7e9f1856..2ce0bb8505 100644 --- a/c/src/lib/libcpu/sh/sh7032/sci/sci.c +++ b/c/src/lib/libcpu/sh/sh7032/sci/sci.c @@ -44,7 +44,7 @@ struct scidev_t { char * name ; - unsigned32 addr ; + uint32_t addr ; rtems_device_minor_number minor ; unsigned short opened ; tcflag_t cflags ; @@ -65,8 +65,8 @@ static int _sci_set_cflags( struct scidev_t *sci_dev, tcflag_t c_cflag ) { - unsigned8 smr ; - unsigned8 brr ; + uint8_t smr ; + uint8_t brr ; if ( c_cflag & CBAUD ) { @@ -108,7 +108,7 @@ static int _sci_set_cflags( static void _sci_init( rtems_device_minor_number minor ) { - unsigned16 temp16 ; + uint16_t temp16 ; /* Pin function controller initialisation for asynchronous mode */ if( minor == 0) @@ -146,7 +146,7 @@ static void _sci_tx_polled( const char buf ) { struct scidev_t *scidev = &sci_device[minor] ; - signed8 ssr ; + int8_t ssr ; while ( !inb((scidev->addr + SCI_SSR) & SCI_TDRE )) ; @@ -220,7 +220,7 @@ rtems_device_driver sh_sci_open( rtems_device_minor_number minor, void * arg ) { - unsigned8 temp8; + uint8_t temp8; /* check for valid minor number */ if(( minor > ( SCI_MINOR_DEVICES -1 )) || ( minor < 0 )) diff --git a/c/src/lib/libcpu/sh/sh7032/score/cpu_asm.c b/c/src/lib/libcpu/sh/sh7032/score/cpu_asm.c index 5c3d4d21c7..94bcb30518 100644 --- a/c/src/lib/libcpu/sh/sh7032/score/cpu_asm.c +++ b/c/src/lib/libcpu/sh/sh7032/score/cpu_asm.c @@ -68,10 +68,10 @@ unsigned int sh_set_irq_priority( unsigned int irq, unsigned int prio ) { - unsigned32 shiftcount; - unsigned32 prioreg; - unsigned16 temp16; - unsigned32 level; + uint32_t shiftcount; + uint32_t prioreg; + uint16_t temp16; + uint32_t level; /* * first check for valid interrupt @@ -255,9 +255,9 @@ asm volatile( * This routine provides the RTEMS interrupt management. */ -void __ISR_Handler( unsigned32 vector) +void __ISR_Handler( uint32_t vector) { - register unsigned32 level; + register uint32_t level; _CPU_ISR_Disable( level ); diff --git a/c/src/lib/libcpu/sh/sh7032/timer/timer.c b/c/src/lib/libcpu/sh/sh7032/timer/timer.c index ea39213540..895bcea5da 100644 --- a/c/src/lib/libcpu/sh/sh7032/timer/timer.c +++ b/c/src/lib/libcpu/sh/sh7032/timer/timer.c @@ -64,17 +64,17 @@ rtems_isr timerisr(); -static rtems_unsigned32 Timer_interrupts; +static uint32_t Timer_interrupts; rtems_boolean Timer_driver_Find_average_overhead; -static rtems_unsigned32 Timer_HZ ; +static uint32_t Timer_HZ ; void Timer_initialize( void ) { - rtems_unsigned8 temp8; - rtems_unsigned16 temp16; - rtems_unsigned32 level; + uint8_t temp8; + uint16_t temp16; + uint32_t level; rtems_isr *ignored; Timer_HZ = rtems_cpu_configuration_get_clicks_per_second() / CLOCK_SCALE ; @@ -149,8 +149,8 @@ void Timer_initialize( void ) int Read_timer( void ) { - rtems_unsigned32 cclicks; - rtems_unsigned32 total ; + uint32_t cclicks; + uint32_t total ; /* * Read the timer and see how many clicks it has been since we started. */ @@ -201,7 +201,7 @@ void Set_find_average_overhead( #pragma interrupt void timerisr( void ) { - unsigned8 temp8; + uint8_t temp8; /* reset the flags of the status register */ temp8 = read8( ITU_TSR1) & ITU1_STAT_MASK; -- cgit v1.2.3