Changeset b459526 in rtems


Ignore:
Timestamp:
Aug 30, 2000, 8:18:56 AM (20 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
152b1e3
Parents:
3cbb63a
Message:

2000-08-26 Rosimildo da Silva <rdasilva@…>

  • shared/comm: Added "/dev/ttyS1" & "/dev/ttyS2" support for the i386 BSPs.
  • shared/comm/gdb_glue.c: New file.
  • shared/comm/i386_io.c: New file.
  • shared/comm/tty_drv.c: New file.
  • shared/comm/tty_drv.h: New file.
  • shared/comm/Makefile.am: Account for new files.
  • shared/comm/uart.c: Adds support for sending characters to another "line discipline."
Location:
c/src/lib/libbsp/i386/shared
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/shared/ChangeLog

    r3cbb63a rb459526  
     1
     2        * shared/comm: Added "/dev/ttyS1" & "/dev/ttyS2" support for
     3        the i386 BSPs.
     4        * shared/comm/gdb_glue.c: New file.
     5        * shared/comm/i386_io.c: New file.
     6        * shared/comm/tty_drv.c: New file.
     7        * shared/comm/tty_drv.h: New file.
     8        * shared/comm/Makefile.am: Account for new files.
     9        * shared/comm/uart.c: Adds support for sending characters to
     10        another "line discipline."
     11
     122000-08-10      Joel Sherrill <joel@OARcorp.com>
    113
    214        * ChangeLog: New file.
  • c/src/lib/libbsp/i386/shared/comm/Makefile.am

    r3cbb63a rb459526  
    55AUTOMAKE_OPTIONS = foreign 1.4
    66
    7 H_FILES = uart.h
     7H_FILES = uart.h tty_drv.h i386_io.h
    88
    9 C_FILES = i386-stub-glue.c i386-stub.c uart.c
     9C_FILES = i386-stub-glue.c i386-stub.c uart.c tty_drv.c gdb_glue.c
    1010
    1111noinst_DATA = GDB.HOWTO
     
    2020all-local: $(PREINSTALL_FILES)
    2121
    22 EXTRA_DIST = GDB.HOWTO i386-stub-glue.c i386-stub.c uart.c uart.h
     22EXTRA_DIST = GDB.HOWTO i386-stub-glue.c i386-stub.c uart.c uart.h tty_drv.h \
     23    i386_io.h tty_drv.c gdb_glue.c
    2324
    2425include $(top_srcdir)/../../../../../automake/local.am
  • c/src/lib/libbsp/i386/shared/comm/uart.c

    r3cbb63a rb459526  
    424424static char          termios_tx_hold_com2        = 0;
    425425static volatile char termios_tx_hold_valid_com2  = 0;
     426
     427static void ( *driver_input_handler_com1 )( void *,  char *, int ) = 0;
     428static void ( *driver_input_handler_com2 )( void *,  char *, int ) = 0;
     429
     430/*
     431 * This routine sets the handler to handle the characters received
     432 * from the serial port.
     433 */
     434void uart_set_driver_handler( int port, void ( *handler )( void *,  char *, int ) )
     435{
     436  switch( port )
     437  {
     438    case BSP_UART_COM1:
     439     driver_input_handler_com1 = handler;
     440     break;
     441
     442    case BSP_UART_COM2:
     443     driver_input_handler_com2 = handler;
     444     break;
     445  }
     446}
     447
    426448
    427449/*
     
    617639            {
    618640              /* Update rx buffer */
    619               rtems_termios_enqueue_raw_characters(termios_ttyp_com1,
    620                                                    (char *)buf,
    621                                                    off);
     641         if( driver_input_handler_com1 )
     642         {
     643             driver_input_handler_com1( termios_ttyp_com1, (char *)buf, off );
     644         }
     645         else
     646         {
     647            /* Update rx buffer */
     648                 rtems_termios_enqueue_raw_characters(termios_ttyp_com1, (char *)buf, off );
     649         }
    622650            }
    623651          return;
     
    711739            {
    712740              /* Update rx buffer */
    713               rtems_termios_enqueue_raw_characters(termios_ttyp_com2,
    714                                                    (char *)buf,
    715                                                    off);
     741         if( driver_input_handler_com2 )
     742         {
     743             driver_input_handler_com2( termios_ttyp_com2, (char *)buf, off );
     744         }
     745         else
     746         {
     747                rtems_termios_enqueue_raw_characters(termios_ttyp_com2, (char *)buf, off);
     748         }
    716749            }
    717750          return;
Note: See TracChangeset for help on using the changeset viewer.