From 864320562db94e546fb0b6e84278cfb80b83219b Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Fri, 5 Sep 2008 05:47:15 +0000 Subject: Convert to "bool". --- c/src/lib/libbsp/sparc/erc32/console/console.c | 14 +++++++------- c/src/lib/libbsp/sparc/erc32/timer/timer.c | 8 ++++---- c/src/lib/libbsp/sparc/leon2/console/console.c | 14 +++++++------- c/src/lib/libbsp/sparc/leon2/timer/timer.c | 8 ++++---- c/src/lib/libbsp/sparc/leon3/timer/timer.c | 8 ++++---- 5 files changed, 26 insertions(+), 26 deletions(-) (limited to 'c/src/lib/libbsp') diff --git a/c/src/lib/libbsp/sparc/erc32/console/console.c b/c/src/lib/libbsp/sparc/erc32/console/console.c index c7ec8a366a..ba6a737347 100644 --- a/c/src/lib/libbsp/sparc/erc32/console/console.c +++ b/c/src/lib/libbsp/sparc/erc32/console/console.c @@ -71,7 +71,7 @@ int console_inbyte_nonblocking( int port ); #include Ring_buffer_t TX_Buffer[ 2 ]; -boolean Is_TX_active[ 2 ]; +bool Is_TX_active[ 2 ]; void *console_termios_data[ 2 ]; @@ -110,7 +110,7 @@ rtems_isr console_isr_a( Ring_buffer_Remove_character( &TX_Buffer[ 0 ], ch ); ERC32_MEC.UART_Channel_A = (uint32_t) ch; } else - Is_TX_active[ 0 ] = FALSE; + Is_TX_active[ 0 ] = false; } ERC32_Clear_interrupt( ERC32_INTERRUPT_UART_A_RX_TX ); @@ -151,7 +151,7 @@ rtems_isr console_isr_b( Ring_buffer_Remove_character( &TX_Buffer[ 1 ], ch ); ERC32_MEC.UART_Channel_B = (uint32_t) ch; } else - Is_TX_active[ 1 ] = FALSE; + Is_TX_active[ 1 ] = false; } ERC32_Clear_interrupt( ERC32_INTERRUPT_UART_B_RX_TX ); @@ -228,8 +228,8 @@ void console_initialize_interrupts( void ) Ring_buffer_Initialize( &TX_Buffer[ 0 ] ); Ring_buffer_Initialize( &TX_Buffer[ 1 ] ); - Is_TX_active[ 0 ] = FALSE; - Is_TX_active[ 1 ] = FALSE; + Is_TX_active[ 0 ] = false; + Is_TX_active[ 1 ] = false; atexit( console_exit ); @@ -263,8 +263,8 @@ void console_outbyte_interrupt( * If this is the first character then we need to prime the pump */ - if ( Is_TX_active[ port ] == FALSE ) { - Is_TX_active[ port ] = TRUE; + if ( Is_TX_active[ port ] == false ) { + Is_TX_active[ port ] = true; console_outbyte_polled( port, ch ); return; } diff --git a/c/src/lib/libbsp/sparc/erc32/timer/timer.c b/c/src/lib/libbsp/sparc/erc32/timer/timer.c index 1a1b2387f1..39a0bc2b48 100644 --- a/c/src/lib/libbsp/sparc/erc32/timer/timer.c +++ b/c/src/lib/libbsp/sparc/erc32/timer/timer.c @@ -24,7 +24,7 @@ bool benchmark_timer_find_average_overhead; -bool benchmark_timer_is_initialized = FALSE; +bool benchmark_timer_is_initialized = false; void benchmark_timer_initialize(void) { @@ -32,14 +32,14 @@ void benchmark_timer_initialize(void) * Timer runs long and accurate enough not to require an interrupt. */ - if ( benchmark_timer_is_initialized == FALSE ) { + if ( benchmark_timer_is_initialized == false ) { /* approximately 1 us per countdown */ ERC32_MEC.General_Purpose_Timer_Scalar = CLOCK_SPEED - 1; ERC32_MEC.General_Purpose_Timer_Counter = 0xffffffff; } else { - benchmark_timer_is_initialized = TRUE; + benchmark_timer_is_initialized = true; } ERC32_MEC_Set_General_Purpose_Timer_Control( @@ -71,7 +71,7 @@ int benchmark_timer_read(void) total = 0xffffffff - total; - if ( benchmark_timer_find_average_overhead == 1 ) + if ( benchmark_timer_find_average_overhead == true ) return total; /* in one microsecond units */ if ( total < LEAST_VALID ) diff --git a/c/src/lib/libbsp/sparc/leon2/console/console.c b/c/src/lib/libbsp/sparc/leon2/console/console.c index 8d0c6999cf..25deed7cd6 100644 --- a/c/src/lib/libbsp/sparc/leon2/console/console.c +++ b/c/src/lib/libbsp/sparc/leon2/console/console.c @@ -72,7 +72,7 @@ int console_inbyte_nonblocking( int port ); #include Ring_buffer_t TX_Buffer[ 2 ]; -boolean Is_TX_active[ 2 ]; +bool Is_TX_active[ 2 ]; void *console_termios_data[ 2 ]; @@ -110,7 +110,7 @@ rtems_isr console_isr_a( Ring_buffer_Remove_character( &TX_Buffer[ 0 ], ch ); LEON_REG.UART_Channel_1 = (uint32_t) ch; } else - Is_TX_active[ 0 ] = FALSE; + Is_TX_active[ 0 ] = false; } LEON_Clear_interrupt( LEON_INTERRUPT_UART_1_RX_TX ); @@ -150,7 +150,7 @@ rtems_isr console_isr_b( Ring_buffer_Remove_character( &TX_Buffer[ 1 ], ch ); LEON_REG.UART_Channel_2 = (uint32_t) ch; } else - Is_TX_active[ 1 ] = FALSE; + Is_TX_active[ 1 ] = false; } LEON_Clear_interrupt( LEON_INTERRUPT_UART_2_RX_TX ); @@ -233,8 +233,8 @@ void console_initialize_interrupts( void ) Ring_buffer_Initialize( &TX_Buffer[ 0 ] ); Ring_buffer_Initialize( &TX_Buffer[ 1 ] ); - Is_TX_active[ 0 ] = FALSE; - Is_TX_active[ 1 ] = FALSE; + Is_TX_active[ 0 ] = false; + Is_TX_active[ 1 ] = false; atexit( console_exit ); @@ -271,8 +271,8 @@ void console_outbyte_interrupt( * If this is the first character then we need to prime the pump */ - if ( Is_TX_active[ port ] == FALSE ) { - Is_TX_active[ port ] = TRUE; + if ( Is_TX_active[ port ] == false ) { + Is_TX_active[ port ] = true; console_outbyte_polled( port, ch ); return; } diff --git a/c/src/lib/libbsp/sparc/leon2/timer/timer.c b/c/src/lib/libbsp/sparc/leon2/timer/timer.c index 4691d845e5..b071b5c74c 100644 --- a/c/src/lib/libbsp/sparc/leon2/timer/timer.c +++ b/c/src/lib/libbsp/sparc/leon2/timer/timer.c @@ -24,7 +24,7 @@ bool benchmark_timer_find_average_overhead; -bool benchmark_timer_is_initialized = FALSE; +bool benchmark_timer_is_initialized = false; void benchmark_timer_initialize(void) { @@ -32,14 +32,14 @@ void benchmark_timer_initialize(void) * Timer runs long and accurate enough not to require an interrupt. */ - if ( benchmark_timer_is_initialized == FALSE ) { + if ( benchmark_timer_is_initialized == false ) { /* approximately 1 us per countdown */ LEON_REG.Timer_Counter_2 = 0xffffff; LEON_REG.Timer_Reload_2 = 0xffffff; } else { - benchmark_timer_is_initialized = TRUE; + benchmark_timer_is_initialized = true; } LEON_REG.Timer_Control_2 = ( @@ -61,7 +61,7 @@ int benchmark_timer_read(void) total = 0xffffff - total; - if ( benchmark_timer_find_average_overhead == 1 ) + if ( benchmark_timer_find_average_overhead == true ) return total; /* in one microsecond units */ if ( total < LEAST_VALID ) diff --git a/c/src/lib/libbsp/sparc/leon3/timer/timer.c b/c/src/lib/libbsp/sparc/leon3/timer/timer.c index 5f27a7d8ac..03d7536db0 100644 --- a/c/src/lib/libbsp/sparc/leon3/timer/timer.c +++ b/c/src/lib/libbsp/sparc/leon3/timer/timer.c @@ -32,7 +32,7 @@ bool benchmark_timer_find_average_overhead; -bool benchmark_timer_is_initialized = FALSE; +bool benchmark_timer_is_initialized = false; extern volatile LEON3_Timer_Regs_Map *LEON3_Timer_Regs; @@ -42,12 +42,12 @@ void benchmark_timer_initialize(void) * Timer runs long and accurate enough not to require an interrupt. */ if (LEON3_Timer_Regs) { - if ( benchmark_timer_is_initialized == FALSE ) { + if ( benchmark_timer_is_initialized == false ) { /* approximately 1 us per countdown */ LEON3_Timer_Regs->timer[LEON3_TIMER_INDEX].reload = 0xffffff; LEON3_Timer_Regs->timer[LEON3_TIMER_INDEX].value = 0xffffff; } else { - benchmark_timer_is_initialized = TRUE; + benchmark_timer_is_initialized = true; } LEON3_Timer_Regs->timer[LEON3_TIMER_INDEX].conf = LEON3_GPTIMER_EN | LEON3_GPTIMER_LD; } @@ -66,7 +66,7 @@ int benchmark_timer_read(void) total = 0xffffff - total; - if ( benchmark_timer_find_average_overhead == 1 ) + if ( benchmark_timer_find_average_overhead == true ) return total; /* in one microsecond units */ if ( total < LEAST_VALID ) -- cgit v1.2.3