Beispiel #1
0
/*
 * paux device driver CLOSE entry point
 */
rtems_device_driver paux_close(
  rtems_device_major_number major,
  rtems_device_minor_number minor,
  void                      *arg)
{
  return (rtems_termios_close (arg));
}
rtems_device_driver console_close(
	rtems_device_major_number	major,
	rtems_device_minor_number	minor,
	void				*arg)
{
	return rtems_termios_close(arg);
}
static
rtems_device_driver my_pty_close(
  rtems_device_major_number major,
  rtems_device_minor_number minor,
  void                    * arg
)
{
  return rtems_termios_close(arg);
}
Beispiel #4
0
/*
 * TTY - device driver CLOSE entry point
 */
rtems_device_driver
serial_mouse_close(rtems_device_major_number major,
              rtems_device_minor_number minor,
              void                      *arg)
{

  return (rtems_termios_close (arg));

} /* tty_close */
/*-------------------------------------------------------------------------+
| Console device driver OPEN entry point
+--------------------------------------------------------------------------*/
rtems_device_driver
console_open(rtems_device_major_number major,
                rtems_device_minor_number minor,
                void                      *arg)
{
  rtems_status_code              status;
  static rtems_termios_callbacks cb =
#if defined(USE_POLLED_IO)
  { 
     NULL,                              /* firstOpen */
     NULL,                              /* lastClose */
     NULL,                              /* pollRead */
     BSP_uart_termios_write_polled,     /* write */
     conSetAttr,                        /* setAttributes */
     NULL,                              /* stopRemoteTx */
     NULL,                              /* startRemoteTx */
     0                                  /* outputUsesInterrupts */
  };
#else
  { 
     console_first_open,                /* firstOpen */
     console_last_close,                /* lastClose */
     NULL,                              /* pollRead */
     BSP_uart_termios_write_com,        /* write */
     conSetAttr,                        /* setAttributes */
     NULL,                              /* stopRemoteTx */
     NULL,                              /* startRemoteTx */
     1                                  /* outputUsesInterrupts */
  };
#endif

  status = rtems_termios_open (major, minor, arg, &cb);

  if(status != RTEMS_SUCCESSFUL)
    {
      printk("Error opening console device\n");
      return status;
    }

  return RTEMS_SUCCESSFUL;
}

/*-------------------------------------------------------------------------+
| Console device driver CLOSE entry point
+--------------------------------------------------------------------------*/
rtems_device_driver
console_close(rtems_device_major_number major,
              rtems_device_minor_number minor,
              void                      *arg)
{
  rtems_device_driver res = RTEMS_SUCCESSFUL;

  res =  rtems_termios_close (arg);

  return res;
} /* console_close */
/* console_close --
 *     Close console device.
 *
 * PARAMETERS:
 *     major - major device number for console devices
 *     minor - minor device number for console
 *     arg - device close argument
 *
 * RETURNS:
 *     RTEMS error code
 */
rtems_device_driver
console_close(rtems_device_major_number major,
              rtems_device_minor_number minor,
              void *arg)
{
    if (console_mode != CONSOLE_MODE_RAW)
        return rtems_termios_close (arg);
    else
        return RTEMS_SUCCESSFUL;
}
Beispiel #7
0
/**
 *  @brief Console device driver CLOSE entry point
 *
 *  @param  major diver major number
 *  @param  minor driver minor mumber
 *  @param  *arg pointer to parameters
 *  @return status code
 */
rtems_device_driver
console_close(rtems_device_major_number major,
              rtems_device_minor_number minor,
              void                      *arg)
{
  rtems_device_driver res = RTEMS_SUCCESSFUL;

  res =  rtems_termios_close (arg);

  return res;
}
Beispiel #8
0
/*
 * Close the device
 */
rtems_device_driver console_close(
				  rtems_device_major_number major,
				  rtems_device_minor_number minor,
				  void                    * arg
				  )
{
  rtems_status_code rc;

  rc = rtems_termios_close (arg);
  sccttyp[minor] = NULL;

  return rc;

}
Beispiel #9
0
/*
 * Close the device
 */
rtems_device_driver console_close(
  rtems_device_major_number major,
  rtems_device_minor_number minor,
  void *arg
)
{
  if ( minor > NUM_PORTS-1 )
    return RTEMS_INVALID_NUMBER;

  #if UARTS_USE_TERMIOS == 1
    return rtems_termios_close( arg );
  #else
    return RTEMS_SUCCESSFUL;
  #endif
}
rtems_device_driver console_close(
  rtems_device_major_number major,
  rtems_device_minor_number minor,
  void                    * arg
)
{
	rtems_libio_open_close_args_t *args = arg;

	if((args->iop->flags&LIBIO_FLAGS_READ) &&
	   Console_Port_Tbl[minor].pDeviceFlow &&
	   Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx)
	{
		Console_Port_Tbl[minor].pDeviceFlow->deviceStopRemoteTx(minor);
	}

	return rtems_termios_close (arg);
}