RTEMS  5.0.0
Files | Data Structures | Typedefs | Functions
Input/Output

Files

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  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. More...
 
rtems_status_code rtems_io_open (rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
 Opening for the IO manager. More...
 
rtems_status_code rtems_io_close (rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
 Closing for the IO manager. More...
 
rtems_status_code rtems_io_read (rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
 Reading for the IO manager. More...
 
rtems_status_code rtems_io_write (rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
 Writing for the IO manager. More...
 
rtems_status_code rtems_io_control (rtems_device_major_number major, rtems_device_minor_number minor, void *argument)
 Control for the IO manager. More...
 

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. More...
 
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. More...
 
rtems_status_code rtems_io_unregister_driver (rtems_device_major_number major)
 Unregister a driver from the device driver table. More...
 
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. More...
 

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]majoris the device driver number.
[in]minoris the device number.
[in]argumentis 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]majoris the device driver number.
[in]minoris the device number.
[in]argumentis 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_ERROROnly 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]majoris the device drive number
[in]minoris the device number
[in]argumentis 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]majoris the device driver number.
[in]minoris the device number.
[in]argumentis 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]majoris the device driver number.
[in]minoris the device number.
[in]argumentis 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_SUCCESSFULDevice successfully registered and initialized.
RTEMS_INVALID_ADDRESSPointer to driver table or to registered major number are invalid. Device driver table is empty.
RTEMS_INVALID_NUMBERInvalid major number.
RTEMS_TOO_MANYNo major number available.
RTEMS_RESOURCE_IN_USEMajor number in use.
RTEMS_CALLED_FROM_ISRCalled 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_SUCCESSFULName successfully registered.
RTEMS_TOO_MANYName 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]majoris the device major number.
Return values
RTEMS_SUCCESSFULDevice driver successfully unregistered.
RTEMS_UNSATISFIEDInvalid major number.
RTEMS_CALLED_FROM_ISRCalled 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]majoris the device driver number.
[in]minoris the device number.
[in]argumentis the pointer to the argument(s).
Returns
Status code.