RTEMS: Input/Output

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Files | Data Structures | Typedefs | Functions
Input/Output
API » Classic

## Files
file | imfs_eval_devfs.c
| Implementation of IMFS_eval_path_devfs().
file | ioman.c
| RTEMS Register IO Name.
file | io.c
| Initialization of Device Drivers.
file | ioclose.c
| Closing for The IO Manager.
file | iocontrol.c
| Control for The IO Manager.
file | iodefault.c
| This file contains definitions of IO drivers data structures for the default application configuration.
file | ioinitialize.c
| IO Driver Initialization.
file | ioopen.c
| Opening for The IO Manager.
file | ioread.c
| Reading for The IO Manager.
file | ioregisterdriver.c
| Classic Input/Output Manager implementation.
file | iounregisterdriver.c
| Unregister a Driver from the Device Driver Table.
file | iowrite.c
| Writing for The IO Manager.

## Data Structures
struct | rtems_driver_address_table

## Typedefs
typedef uint32_t | rtems_device_major_number
typedef uint32_t | rtems_device_minor_number
typedef rtems_status_code | rtems_device_driver
typedef rtems_device_driver(* | rtems_device_driver_entry) (rtems_device_major_number, rtems_device_minor_number, void *)

## Functions
rtems_status_code | rtems_io_initialize (rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
| IO driver initialization.
rtems_status_code | rtems_io_open (rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
| Opening for the IO manager.
rtems_status_code | rtems_io_close (rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
| Closing for the IO manager.
rtems_status_code | rtems_io_read (rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
| Reading for the IO manager.
rtems_status_code | rtems_io_write (rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
| Writing for the IO manager.
rtems_status_code | rtems_io_control (rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
| Control for the IO manager.

## Device Driver Maintainance
rtems_status_code | rtems_io_driver_io_error (rtems_device_major_number major, rtems_device_minor_number minor, void *arg)
| Returns `RTEMS_IO_ERROR`.
rtems_status_code | rtems_io_register_driver (rtems_device_major_number major, const rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major)
| Registers and initializes the device with the device driver table driver_table and major number major.
rtems_status_code | rtems_io_unregister_driver (rtems_device_major_number major)
| Unregister a driver from the device driver table.
rtems_status_code | rtems_io_register_name (const char *device_name, rtems_device_major_number major, rtems_device_minor_number minor)
| Registers the name device_name in the file system for the device with number tuple major and minor.

## Detailed Description

## Function Documentation

## ◆ rtems_io_close()

rtems_status_code rtems_io_close | ( | rtems_device_major_number | major,
|  | rtems_device_minor_number | minor,
|  | void * | argument
| ) |  |

Closing for the IO manager.

This routine is the close directive of the IO manager.

Parameters

  [in] | major | is the device driver number.
  [in] | minor | is the device number.
  [in] | argument | is the pointer to the argument(s).

Returns
  Status code.

## ◆ rtems_io_control()

rtems_status_code rtems_io_control | ( | rtems_device_major_number | major,
|  | rtems_device_minor_number | minor,
|  | void * | argument
| ) |  |

Control for the IO manager.

This routine is the control directive of the IO manager.

Parameters

  [in] | major | is the device driver number.
  [in] | minor | is the device number.
  [in] | argument | is the pointer to the argument(s).

Returns
  Status code.

## ◆ rtems_io_driver_io_error()

rtems_status_code rtems_io_driver_io_error | ( | rtems_device_major_number | major,
|  | rtems_device_minor_number | minor,
|  | void * | arg
| ) |  |

Returns `RTEMS_IO_ERROR`.

Return values

  RTEMS_IO_ERROR | Only this one.

## ◆ rtems_io_initialize()

rtems_status_code rtems_io_initialize | ( | rtems_device_major_number | major,
|  | rtems_device_minor_number | minor,
|  | void * | argument
| ) |  |

IO driver initialization.

This routine is the initialization directive of the IO manager.

Parameters

  [in] | major | is the device drive number
  [in] | minor | is the device number
  [in] | argument | is the pointer to the argument(s)

Returns
  status code

## ◆ rtems_io_open()

rtems_status_code rtems_io_open | ( | rtems_device_major_number | major,
|  | rtems_device_minor_number | minor,
|  | void * | argument
| ) |  |

Opening for the IO manager.

Opens a device driver with the number major.

Parameters

  [in] | major | is the device driver number.
  [in] | minor | is the device number.
  [in] | argument | is the pointer to the argument(s).

Returns
  Status code.

## ◆ rtems_io_read()

rtems_status_code rtems_io_read | ( | rtems_device_major_number | major,
|  | rtems_device_minor_number | minor,
|  | void * | argument
| ) |  |

Reading for the IO manager.

This routine is the read directive of the IO manager.

Parameters

  [in] | major | is the device driver number.
  [in] | minor | is the device number.
  [in] | argument | is the pointer to the argument(s).

Returns
  Status code.

## ◆ rtems_io_register_driver()

rtems_status_code rtems_io_register_driver | ( | rtems_device_major_number | major,
|  | const rtems_driver_address_table * | driver_table,
|  | rtems_device_major_number * | registered_major
| ) |  |

Registers and initializes the device with the device driver table driver_table and major number major.

If the major number equals zero a major number will be obtained. The major number of the registered driver will be returned in registered_major.

After a successful registration rtems_io_initialize() will be called to initialize the device.

Return values

  RTEMS_SUCCESSFUL | Device successfully registered and initialized.
  RTEMS_INVALID_ADDRESS | Pointer to driver table or to registered major number are invalid. Device driver table is empty.
  RTEMS_INVALID_NUMBER | Invalid major number.
  RTEMS_TOO_MANY | No major number available.
  RTEMS_RESOURCE_IN_USE | Major number in use.
  RTEMS_CALLED_FROM_ISR | Called from interrupt context.
  * | Status code depends on rtems_io_initialize().

## ◆ rtems_io_register_name()

rtems_status_code rtems_io_register_name | ( | const char * | device_name,
|  | rtems_device_major_number | major,
|  | rtems_device_minor_number | minor
| ) |  |

Registers the name device_name in the file system for the device with number tuple major and minor.

This assumes that all registered devices are character devices.

Return values

  RTEMS_SUCCESSFUL | Name successfully registered.
  RTEMS_TOO_MANY | Name already in use or other errors.

## ◆ rtems_io_unregister_driver()

rtems_status_code rtems_io_unregister_driver | ( | rtems_device_major_number | major | ) |

Unregister a driver from the device driver table.

Parameters

  [in] | major | is the device major number.

Return values

  RTEMS_SUCCESSFUL | Device driver successfully unregistered.
  RTEMS_UNSATISFIED | Invalid major number.
  RTEMS_CALLED_FROM_ISR | Called from interrupt context.

## ◆ rtems_io_write()

rtems_status_code rtems_io_write | ( | rtems_device_major_number | major,
|  | rtems_device_minor_number | minor,
|  | void * | argument
| ) |  |

Writing for the IO manager.

This routine is the write directive of the IO manager.

Parameters

  [in] | major | is the device driver number.
  [in] | minor | is the device number.
  [in] | argument | is the pointer to the argument(s).

Returns
  Status code.