From 326cc87faf8d1d34060bcf9b1d6648d7934762bf Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Tue, 2 Sep 2008 12:26:55 +0000 Subject: Convert to using bool. --- c/src/lib/libcpu/sh/sh7045/include/sci.h | 2 +- c/src/lib/libcpu/sh/sh7045/sci/sci.c | 34 ++++++++++++------------- c/src/lib/libcpu/sh/sh7750/include/sh/sh4uart.h | 8 +++--- 3 files changed, 22 insertions(+), 22 deletions(-) (limited to 'c/src/lib/libcpu/sh') diff --git a/c/src/lib/libcpu/sh/sh7045/include/sci.h b/c/src/lib/libcpu/sh/sh7045/include/sci.h index 989ec696f0..5802734601 100644 --- a/c/src/lib/libcpu/sh/sh7045/include/sci.h +++ b/c/src/lib/libcpu/sh/sh7045/include/sci.h @@ -80,7 +80,7 @@ extern rtems_device_driver sh_sci_control( ); extern const rtems_termios_callbacks * sh_sci_get_termios_handlers( - rtems_boolean poll + bool poll ); diff --git a/c/src/lib/libcpu/sh/sh7045/sci/sci.c b/c/src/lib/libcpu/sh/sh7045/sci/sci.c index 71241dfe4a..89aa4b592c 100644 --- a/c/src/lib/libcpu/sh/sh7045/sci/sci.c +++ b/c/src/lib/libcpu/sh/sh7045/sci/sci.c @@ -150,10 +150,10 @@ static int _sci_set_cflags( * local functions operate SCI ports 0 and 1 * called from polling routines or ISRs */ -rtems_boolean wrtSCI0(unsigned char ch) +bool wrtSCI0(unsigned char ch) { uint8_t temp; - rtems_boolean result=FALSE; + bool result = false; if ((read8(SCI_SSR0) & SCI_TDRE) != 0x00) { /* Write the character to the TDR */ @@ -161,15 +161,15 @@ rtems_boolean wrtSCI0(unsigned char ch) /* Clear the TDRE bit */ temp = read8(SCI_SSR0) & ~SCI_TDRE; write8(temp, SCI_SSR0); - result = TRUE; + result = true; } return result; } /* wrtSCI0 */ -rtems_boolean wrtSCI1(unsigned char ch) +bool wrtSCI1(unsigned char ch) { uint8_t temp; - rtems_boolean result=FALSE; + bool result = false; if ((read8(SCI_SSR1) & SCI_TDRE) != 0x00) { /* Write the character to the TDR */ @@ -177,7 +177,7 @@ rtems_boolean wrtSCI1(unsigned char ch) /* Clear the TDRE bit */ temp = read8(SCI_SSR1) & ~SCI_TDRE; write8(temp, SCI_SSR1); - result = TRUE; + result = true; } return result; } /* wrtSCI1 */ @@ -188,9 +188,9 @@ void sh_sci_outbyte_polled( char ch ) { if (minor == 0) /* blocks until port ready */ - while (wrtSCI0(ch) != TRUE); /* SCI0*/ + while (wrtSCI0(ch) != true); /* SCI0*/ else - while (wrtSCI1(ch) != TRUE); /* SCI1*/ + while (wrtSCI1(ch) != true); /* SCI1*/ } /* sh_sci_outbyte_polled */ /* @@ -203,10 +203,10 @@ void outbyte( sh_sci_outbyte_polled(minor, (unsigned char)ch); } /* outbyte */ -rtems_boolean rdSCI0(unsigned char *ch) +bool rdSCI0(unsigned char *ch) { uint8_t temp; - rtems_boolean result=FALSE; + bool result = false; if ((read8(SCI_SSR0) & SCI_RDRF) != 0x00) { /* read input */ @@ -222,15 +222,15 @@ rtems_boolean rdSCI0(unsigned char *ch) temp &= ~(SCI_ORER | SCI_FER | SCI_PER); write8(temp, SCI_SSR0); } - result = TRUE; + result = true; } return result; } /* rdSCI0 */ -rtems_boolean rdSCI1(unsigned char *ch) +bool rdSCI1(unsigned char *ch) { uint8_t temp; - rtems_boolean result=FALSE; + bool result = false; if ((read8(SCI_SSR1) & SCI_RDRF) != 0x00) { /* read input */ @@ -246,7 +246,7 @@ rtems_boolean rdSCI1(unsigned char *ch) temp &= ~(SCI_ORER | SCI_FER | SCI_PER); write8(temp, SCI_SSR1); } - result = TRUE; + result = true; } return result; } /* rdSCI1 */ @@ -258,9 +258,9 @@ char sh_sci_inbyte_polled( rtems_device_minor_number minor ) uint8_t ch = 0; if (minor == 0) /* blocks until char.ready */ - while (rdSCI0(&ch) != TRUE); /* SCI0 */ + while (rdSCI0(&ch) != true); /* SCI0 */ else - while (rdSCI1(&ch) != TRUE); /* SCI1 */ + while (rdSCI1(&ch) != true); /* SCI1 */ return ch; } /* sh_sci_inbyte_polled */ @@ -573,7 +573,7 @@ const rtems_termios_callbacks sci_poll_callbacks = { /* FIXME: not yet supported */ const rtems_termios_callbacks sci_interrupt_callbacks; -const rtems_termios_callbacks* sh_sci_get_termios_handlers( rtems_boolean poll ) +const rtems_termios_callbacks* sh_sci_get_termios_handlers( bool poll ) { return poll ? &sci_poll_callbacks : diff --git a/c/src/lib/libcpu/sh/sh7750/include/sh/sh4uart.h b/c/src/lib/libcpu/sh/sh7750/include/sh/sh4uart.h index f8ede19142..0320adcaa4 100644 --- a/c/src/lib/libcpu/sh/sh7750/include/sh/sh4uart.h +++ b/c/src/lib/libcpu/sh/sh7750/include/sh/sh4uart.h @@ -76,15 +76,15 @@ typedef struct sh4uart { 0 if polled I/O */ void *tty; /* termios channel descriptor */ - volatile const char *tx_buf; /* Transmit buffer from termios */ - volatile uint32_t tx_buf_len; /* Transmit buffer length */ - volatile uint32_t tx_ptr; /* Index of next char to transmit*/ + volatile const char *tx_buf; /* Transmit buffer from termios */ + volatile uint32_t tx_buf_len; /* Transmit buffer length */ + volatile uint32_t tx_ptr; /* Index of next char to transmit*/ rtems_isr_entry old_handler_transmit; /* Saved interrupt handlers */ rtems_isr_entry old_handler_receive; tcflag_t c_iflag; /* termios input mode flags */ - rtems_boolean parerr_mark_flag; /* Parity error processing state */ + bool parerr_mark_flag; /* Parity error processing state */ } sh4uart; /* -- cgit v1.2.3