Changeset e7de167c in rtems


Ignore:
Timestamp:
Aug 11, 2000, 7:55:36 PM (21 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
dd19c0b
Parents:
b7d4d2a
Message:

2000-08-11 Charles-Antoine Gauthier <charles.gauthier@…>

  • console/console.c: Fix polled input.
Location:
c/src/lib/libbsp/powerpc/mbx8xx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/mbx8xx/ChangeLog

    rb7d4d2a re7de167c  
     12000-08-11  Charles-Antoine Gauthier  <charles.gauthier@nrc.ca>
     2
     3        * console/console.c: Fix polled input.
     4
    152000-08-10      Charles-Antoine Gauthier  <charles.gauthier@nrc.ca>
    26
  • c/src/lib/libbsp/powerpc/mbx8xx/console/console.c

    rb7d4d2a re7de167c  
    150150
    151151  input_params.clun = 0;
    152   input_params.dlun = 0;
    153152 
    154153  switch( minor ) {
     
    550549#if UARTS_USE_TERMIOS != 1
    551550  rtems_libio_rw_args_t *rw_args = arg;
    552   int i;
     551  int c;
    553552#endif
    554553 
     
    564563#if UARTS_IO_MODE != 1    /* Polled I/O without termios */
    565564
    566   for( i = 0; i < rw_args->count; i++ ) {
    567     rw_args->buffer[i] = BSP_READ( minor );
    568     if( rw_args->buffer[i] == '\r' )
    569       rw_args->buffer[i] = '\n';
    570   }
    571   rw_args->bytes_moved = i;
     565  while( (c = BSP_READ( minor )) == -1 );
     566  rw_args->buffer[0] = (unsigned8)c;
     567  if( rw_args->buffer[0] == '\r' )
     568      rw_args->buffer[0] = '\n';
     569  rw_args->bytes_moved = 1;
    572570  return RTEMS_SUCCESSFUL;
    573571 
     
    593591#if UARTS_USE_TERMIOS != 1
    594592  rtems_libio_rw_args_t *rw_args = arg;
    595   int i;
     593  unsigned32 i;
    596594  char cr = '\r';
    597595#endif
     
    614612      BSP_WRITE( minor, &cr, 1 );
    615613  }
    616   rw_args->bytes_moved = rw_args->count;
     614  rw_args->bytes_moved = i;
    617615  return RTEMS_SUCCESSFUL;
    618616   
Note: See TracChangeset for help on using the changeset viewer.