Changeset fcd7483 in rtems


Ignore:
Timestamp:
Sep 5, 2008, 11:40:32 AM (11 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.9, master
Children:
45a2f3e
Parents:
b40a667
Message:

Convert to "bool".

Location:
c/src/lib/libbsp
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/m68k/mcf5206elite/i2c/i2c.c

    rb40a667 rfcd7483  
    4141i2c_transfer_poll_done_func(uint32_t         arg)
    4242{
    43     rtems_boolean *poll_done_flag = (rtems_boolean *)arg;
    44     *poll_done_flag = 1;
     43    bool *poll_done_flag = (bool *)arg;
     44    *poll_done_flag = true;
    4545}
    4646
     
    9999i2c_transfer_wait_poll(i2c_bus_number bus, i2c_message *msg, int nmsg)
    100100{
    101     volatile rtems_boolean poll_done_flag;
     101    volatile bool poll_done_flag;
    102102    rtems_status_code sc;
    103     poll_done_flag = 0;
     103    poll_done_flag = false;
    104104    sc = i2c_transfer(bus, nmsg, msg, i2c_transfer_poll_done_func,
    105105                      (uint32_t)&poll_done_flag);
    106106    if (sc != RTEMS_SUCCESSFUL)
    107107        return sc;
    108     while (poll_done_flag == 0)
     108    while (poll_done_flag == false)
    109109    {
    110110        i2c_poll(bus);
  • c/src/lib/libbsp/m68k/mcf5206elite/i2c/i2cdrv.c

    rb40a667 rfcd7483  
    6666
    6767/* MBus I2C bus controller busy flag */
    68 static volatile rtems_boolean mbus_busy;
     68static volatile bool mbus_busy;
    6969
    7070/* MBus I2C bus controller descriptor */
     
    9292    rtems_interrupt_disable(level);
    9393    tqueue_tail = (tqueue_tail + 1) % tqueue_size;
    94     mbus_busy = 0;
     94    mbus_busy = false;
    9595    rtems_interrupt_enable(level);
    9696    i2cdrv_unload();
     
    110110    if (!mbus_busy && (tqueue_head != tqueue_tail))
    111111    {
    112         mbus_busy = 1;
     112        mbus_busy = true;
    113113        rtems_interrupt_enable(level);
    114114        qel = tqueue + tqueue_tail;
     
    199199    int i;
    200200    rtems_status_code sc;
    201     mbus_busy = 0;
     201    mbus_busy = false;
    202202    tqueue_tail = tqueue_head = 0;
    203203    tqueue_size = 32;
  • c/src/lib/libbsp/nios2/nios2_iss/console/console.c

    rb40a667 rfcd7483  
    7272 */
    7373
    74 rtems_boolean is_character_ready(
     74bool is_character_ready(
    7575  char *ch
    7676)
     
    8383        *ch = (data & ALTERA_AVALON_JTAG_UART_DATA_DATA_MSK)
    8484              >> ALTERA_AVALON_JTAG_UART_DATA_DATA_OFST;
    85         return TRUE;
     85        return true;
    8686    };
    8787
    88     return FALSE;
     88    return false;
    8989}
    9090
  • c/src/lib/libbsp/nios2/nios2_iss/timer/timer.c

    rb40a667 rfcd7483  
    2828
    2929volatile uint32_t Timer_interrupts;
    30 rtems_boolean    benchmark_timer_find_average_overhead;
     30bool benchmark_timer_find_average_overhead;
    3131
    3232#define TIMER_REGS ((altera_avalon_timer_regs*)NIOS2_IO_BASE(TIMER_BASE))
     
    134134}
    135135
    136 void benchmark_timer_disable_subtracting_average_overhead(
    137   rtems_boolean find_flag
    138 )
     136void benchmark_timer_disable_subtracting_average_overhead(bool find_flag)
    139137{
    140138  benchmark_timer_find_average_overhead = find_flag;
  • c/src/lib/libbsp/no_cpu/no_bsp/console/console.c

    rb40a667 rfcd7483  
    5959 */
    6060
    61 rtems_boolean is_character_ready(
     61bool is_character_ready(
    6262  char *ch
    6363)
    6464{
    6565  *ch = '\0';   /* return NULL for no particular reason */
    66   return(TRUE);
     66  return true;
    6767}
    6868
  • c/src/lib/libbsp/no_cpu/no_bsp/timer/timer.c

    rb40a667 rfcd7483  
    2323
    2424uint32_t         Timer_interrupts;
    25 rtems_boolean benchmark_timer_find_average_overhead;
     25bool benchmark_timer_find_average_overhead;
    2626
    2727void benchmark_timer_initialize( void )
     
    7474  total = clicks * 0;
    7575
    76   if ( benchmark_timer_find_average_overhead == 1 )
     76  if ( benchmark_timer_find_average_overhead == true )
    7777    return total;          /* in XXX microsecond units */
    7878  else {
     
    8787
    8888void benchmark_timer_disable_subtracting_average_overhead(
    89   rtems_boolean find_flag
     89  bool find_flag
    9090)
    9191{
  • c/src/lib/libbsp/powerpc/ep1a/console/config.c

    rb40a667 rfcd7483  
    363363};
    364364
    365 static boolean config_68360_scc_base_probe(int minor, unsigned long busNo, unsigned long slotNo, int channel){
     365static bool config_68360_scc_base_probe(int minor, unsigned long busNo, unsigned long slotNo, int channel)
     366{
    366367  M68360_t chip = M68360_chips;
    367368
     
    376377
    377378  if (!chip)
    378     return FALSE;
     379    return false;
    379380
    380381  Console_Port_Tbl[minor].pDeviceParams = &chip->port[ channel-1 ];
    381382  chip->port[ channel-1 ].minor         = minor;
    382   return (TRUE);
    383 }
    384 
    385 static boolean config_68360_scc_base_probe_1( int minor ) {
    386   return config_68360_scc_base_probe( minor, 0, 11, 1);
     383  return true;
     384}
     385
     386static bool config_68360_scc_base_probe_1( int minor ) {
     387  return config_68360_scc_base_probe(minor, 0, 11, 1);
    387388}
    388389                                                                                                               
    389 static boolean config_68360_scc_base_probe_2( int minor ) {
    390   return config_68360_scc_base_probe( minor, 0, 11, 2);
     390static bool config_68360_scc_base_probe_2( int minor ) {
     391  return config_68360_scc_base_probe(minor, 0, 11, 2);
    391392}
    392393                                                                                                                 
  • c/src/lib/libbsp/powerpc/gen83xx/console/console.c

    rb40a667 rfcd7483  
    5757unsigned long   Console_Port_Count;
    5858rtems_device_minor_number  Console_Port_Minor;
    59 rtems_boolean Console_Is_Initialized = FALSE;           
     59bool Console_Is_Initialized = false;           
    6060/* PAGE
    6161 *
     
    220220    Console_Port_Tbl[Console_Port_Minor]
    221221      .pDeviceFns->deviceInitialize(Console_Port_Minor);
    222     Console_Is_Initialized = TRUE;
     222    Console_Is_Initialized = true;
    223223  }
    224224
  • c/src/lib/libbsp/powerpc/shared/console/inch.c

    rb40a667 rfcd7483  
    7272|        Arguments: outChar - character read in case of a valid reading,
    7373|                   otherwise unchanged.
    74 |          Returns: TRUE in case a valid character has been read,
    75 |                   FALSE otherwise.
    76 +--------------------------------------------------------------------------*/
    77 rtems_boolean
     74|          Returns: true in case a valid character has been read,
     75|                   false otherwise.
     76+--------------------------------------------------------------------------*/
     77bool
    7878_IBMPC_scankey(char *outChar)
    7979{
     
    8585  static int extended      = 0;
    8686
    87   *outChar = 0; /* default value if we return FALSE */
     87  *outChar = 0; /* default value if we return false */
    8888
    8989  /* Read keyboard controller, toggle enable */
     
    9696  inChar=kbd_inb(KBD_STATUS);
    9797  if ((inChar & 0x01) == 0)
    98     return FALSE;
     98    return false;
    9999
    100100  /* Read the data.  Handle nonsense with shift, control, etc. */
     
    108108    case 0xe0:
    109109      extended = 2;
    110       return FALSE;
     110      return false;
    111111      break;
    112112
    113113    case 0x38:
    114114      alt_pressed = 1;
    115       return FALSE;
     115      return false;
    116116      break;
    117117    case 0xb8:
    118118      alt_pressed = 0;
    119       return FALSE;
     119      return false;
    120120      break;
    121121
    122122    case 0x1d:
    123123      ctrl_pressed = 1;
    124       return FALSE;
     124      return false;
    125125      break;
    126126    case 0x9d:
    127127      ctrl_pressed = 0;
    128       return FALSE;
     128      return false;
    129129      break;
    130130
    131131    case 0x2a:
    132132      if (extended)
    133         return FALSE;
     133        return false;
    134134    case 0x36:
    135135      shift_pressed = 1;
    136       return FALSE;
     136      return false;
    137137      break;
    138138    case 0xaa:
    139139      if (extended)
    140         return FALSE;
     140        return false;
    141141    case 0xb6:
    142142      shift_pressed = 0;
    143       return FALSE;
     143      return false;
    144144      break;
    145145
    146146    case 0x3a:
    147147      caps_pressed = 1;
    148       return FALSE;
     148      return false;
    149149      break;
    150150    case 0xba:
    151151      caps_pressed = 0;
    152       return FALSE;
     152      return false;
    153153      break;
    154154
     
    164164      if ((inChar & 0x80) || (inChar > 0x39))
    165165      /* High-bit on means key is being released, not pressed */
    166         return FALSE;
     166        return false;
    167167      break;
    168168  } /* switch */
     
    187187  }
    188188
    189   return TRUE;
     189  return true;
    190190} /* _IBMPC_scankey */
    191191
     
    217217|        Arguments: c - character read if keyboard buffer not empty, otherwise
    218218|                   unchanged.
    219 |          Returns: TRUE if keyboard buffer not empty, FALSE otherwise.
    220 +--------------------------------------------------------------------------*/
    221 rtems_boolean
     219|          Returns: true if keyboard buffer not empty, false otherwise.
     220+--------------------------------------------------------------------------*/
     221bool
    222222_IBMPC_chrdy(char *c)
    223223{
     
    228228
    229229    kbd_first = (kbd_first + 1) % KBD_BUF_SIZE;
    230     return TRUE;
     230    return true;
    231231  }
    232232  else
    233     return FALSE;
     233    return false;
    234234} /* _IBMPC_chrdy */
    235235
Note: See TracChangeset for help on using the changeset viewer.