Changeset 326cc87 in rtems


Ignore:
Timestamp:
Sep 2, 2008, 12:26:55 PM (11 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.9, master
Children:
7e9c03b8
Parents:
5c753ea6
Message:

Convert to using bool.

Location:
c/src/lib/libcpu/sh
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/sh/sh7045/include/sci.h

    r5c753ea6 r326cc87  
    8181
    8282extern const rtems_termios_callbacks * sh_sci_get_termios_handlers(
    83   rtems_boolean poll
     83  bool poll
    8484);
    8585
  • c/src/lib/libcpu/sh/sh7045/sci/sci.c

    r5c753ea6 r326cc87  
    151151 * called from polling routines or ISRs
    152152 */
    153 rtems_boolean wrtSCI0(unsigned char ch)
     153bool wrtSCI0(unsigned char ch)
    154154{
    155155  uint8_t   temp;
    156   rtems_boolean result=FALSE;
     156  bool result = false;
    157157
    158158  if ((read8(SCI_SSR0) & SCI_TDRE) != 0x00) {
     
    162162    temp = read8(SCI_SSR0) & ~SCI_TDRE;
    163163    write8(temp, SCI_SSR0);
    164     result = TRUE;
     164    result = true;
    165165  }
    166166  return result;
    167167} /* wrtSCI0 */
    168168
    169 rtems_boolean wrtSCI1(unsigned char ch)
     169bool wrtSCI1(unsigned char ch)
    170170{
    171171  uint8_t   temp;
    172   rtems_boolean result=FALSE;
     172  bool result = false;
    173173
    174174  if ((read8(SCI_SSR1) & SCI_TDRE) != 0x00) {
     
    178178     temp = read8(SCI_SSR1) & ~SCI_TDRE;
    179179     write8(temp, SCI_SSR1);
    180      result = TRUE;
     180     result = true;
    181181  }
    182182  return result;
     
    189189{
    190190        if (minor == 0) /* blocks until port ready */
    191                 while (wrtSCI0(ch) != TRUE); /* SCI0*/
     191                while (wrtSCI0(ch) != true); /* SCI0*/
    192192        else
    193                 while (wrtSCI1(ch) != TRUE); /* SCI1*/
     193                while (wrtSCI1(ch) != true); /* SCI1*/
    194194} /* sh_sci_outbyte_polled */
    195195
     
    204204} /* outbyte */
    205205
    206 rtems_boolean rdSCI0(unsigned char *ch)
     206bool rdSCI0(unsigned char *ch)
    207207{
    208208  uint8_t   temp;
    209   rtems_boolean result=FALSE;
     209  bool result = false;
    210210
    211211  if ((read8(SCI_SSR0) & SCI_RDRF) != 0x00) {
     
    223223        write8(temp, SCI_SSR0);
    224224    }
    225     result = TRUE;
     225    result = true;
    226226  }
    227227  return result;
    228228} /* rdSCI0 */
    229229
    230 rtems_boolean rdSCI1(unsigned char *ch)
     230bool rdSCI1(unsigned char *ch)
    231231{
    232232  uint8_t   temp;
    233   rtems_boolean result=FALSE;
     233  bool result = false;
    234234
    235235  if ((read8(SCI_SSR1) & SCI_RDRF) != 0x00) {
     
    247247        write8(temp, SCI_SSR1);
    248248    }
    249     result = TRUE;
     249    result = true;
    250250  }
    251251  return result;
     
    259259
    260260  if (minor == 0) /* blocks until char.ready */
    261     while (rdSCI0(&ch) != TRUE); /* SCI0 */
     261    while (rdSCI0(&ch) != true); /* SCI0 */
    262262  else
    263     while (rdSCI1(&ch) != TRUE); /* SCI1 */
     263    while (rdSCI1(&ch) != true); /* SCI1 */
    264264  return ch;
    265265} /* sh_sci_inbyte_polled */
     
    574574const rtems_termios_callbacks sci_interrupt_callbacks;
    575575
    576 const rtems_termios_callbacks* sh_sci_get_termios_handlers( rtems_boolean poll )
     576const rtems_termios_callbacks* sh_sci_get_termios_handlers( bool poll )
    577577{
    578578    return poll ?
  • c/src/lib/libcpu/sh/sh7750/include/sh/sh4uart.h

    r5c753ea6 r326cc87  
    7777   void                *tty;        /* termios channel descriptor */
    7878
    79    volatile const char         *tx_buf;     /* Transmit buffer from termios */
    80    volatile uint32_t      tx_buf_len; /* Transmit buffer length */
    81    volatile uint32_t      tx_ptr;     /* Index of next char to transmit*/
     79   volatile const char *tx_buf;     /* Transmit buffer from termios */
     80   volatile uint32_t    tx_buf_len; /* Transmit buffer length */
     81   volatile uint32_t    tx_ptr;     /* Index of next char to transmit*/
    8282
    8383   rtems_isr_entry      old_handler_transmit;   /* Saved interrupt handlers */
     
    8585
    8686   tcflag_t             c_iflag;            /* termios input mode flags */
    87    rtems_boolean        parerr_mark_flag;   /* Parity error processing state */
     87   bool                 parerr_mark_flag;   /* Parity error processing state */
    8888} sh4uart;
    8989
Note: See TracChangeset for help on using the changeset viewer.