RTEMS: bsps/sparc/leon2/console/console.c File Reference

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Functions
console.c File Reference
Board Support Packages » SPARC » LEON2

TTY driver driver for the serial ports on the LEON console. More...

`#include <stdlib.h>`
`#include <assert.h>`
`#include <rtems/console.h>`
`#include <rtems/libio.h>`
`#include <bsp.h>`

## Functions
rtems_device_driver | console_initialize (rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
| Console initialization entry point.
rtems_device_driver | console_open (rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
| Console open entry point.
rtems_device_driver | console_close (rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
| Console close entry point.
rtems_device_driver | console_read (rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
| Console read entry point.
rtems_device_driver | console_write (rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
| Console write entry point.
rtems_device_driver | console_control (rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
| Console IO control entry point.

## Detailed Description

TTY driver driver for the serial ports on the LEON console.

This file contains the TTY driver for the serial ports on the LEON.

## Function Documentation

## ◆ console_close()

rtems_device_driver console_close | ( | rtems_device_major_number | major,
|  | rtems_device_minor_number | minor,
|  | void * | arg
| ) |  |

Console close entry point.

This method closes a specific device supported by the console device driver.

Parameters

  [in] | major | is the device driver major number
  [in] | minor | is the device driver minor number
  [in] | arg | is the parameters to this call

Return values

  RTEMS_SUCCESSFUL | The device driver is successfully closed.

## ◆ console_control()

rtems_device_driver console_control | ( | rtems_device_major_number | major,
|  | rtems_device_minor_number | minor,
|  | void * | arg
| ) |  |

Console IO control entry point.

This method performs an IO Control operation on a specific device supported by the console device driver.

Parameters

  [in] | major | is the device driver major number
  [in] | minor | is the device driver minor number
  [in] | arg | is the parameters to this call

Return values

  RTEMS_SUCCESSFUL | the device driver IO control operation is successfully performed.

## ◆ console_initialize()

rtems_device_driver console_initialize | ( | rtems_device_major_number | major,
|  | rtems_device_minor_number | minor,
|  | void * | arg
| ) |  |

Console initialization entry point.

This method initializes the console device driver.

Parameters

  [in] | major | is the device driver major number.
  [in] | minor | is the device driver minor number.
  [in] | arg | is the parameters to this call.

Return values

  RTEMS_SUCCESSFUL | The device driver is successfully initialized.

Console initialization entry point.

Initialize all serial drivers specified in driver_context_table

Parameters

  [in] | major |
  [in] | minor |
  [in] | arg |

Return values

  RTEMS_SUCCESSFUL | Initialization completed

This routine initializes the console IO driver.

Parameters

Parameters

  major | major number
  minor | minor number

Output parameters: NONE

Returns
  void

## ◆ console_open()

rtems_device_driver console_open | ( | rtems_device_major_number | major,
|  | rtems_device_minor_number | minor,
|  | void * | arg
| ) |  |

Console open entry point.

This method opens a specific device supported by the console device driver.

Parameters

  [in] | major | is the device driver major number
  [in] | minor | is the device driver minor number
  [in] | arg | is the parameters to this call

Return values

  RTEMS_SUCCESSFUL | The device driver is successfully opened.

## ◆ console_read()

rtems_device_driver console_read | ( | rtems_device_major_number | major,
|  | rtems_device_minor_number | minor,
|  | void * | arg
| ) |  |

Console read entry point.

This method reads from a specific device supported by the console device driver.

Parameters

  [in] | major | is the device driver major number
  [in] | minor | is the device driver minor number
  [in] | arg | is the parameters to this call

Return values

  RTEMS_SUCCESSFUL | The device is successfully read from.

## ◆ console_write()

rtems_device_driver console_write | ( | rtems_device_major_number | major,
|  | rtems_device_minor_number | minor,
|  | void * | arg
| ) |  |

Console write entry point.

This method writes to a specific device supported by the console device driver.

Parameters

  [in] | major | is the device driver major number
  [in] | minor | is the device driver minor number
  [in] | arg | is the parameters to this call

Return values

  RTEMS_SUCCESSFUL | The device is successfully written.