RTEMS Logo

RTEMS 4.6.2 On-Line Library


Discrete Driver Major and Minor Numbers

PREV UP NEXT Bookshelf BSP and Device Driver Development Guide

18.1: Major and Minor Numbers

The major number of a device driver is its index in the RTEMS Device Address Table.

A minor number is associated with each device instance managed by a particular device driver. An RTEMS minor number is an unsigned32 entity. Convention calls for dividing the bits in the minor number down into categories that specify a particular bitfield. This results in categories like the following:

From the above, it should be clear that a single device driver can support multiple copies of the same board in a single system. The minor number is used to distinguish the devices.

By providing a way to easily access a particular bitfield from the device driver, the application is insulated with knowing how to mask fields in and out of a discrete I/O.


PREV UP NEXT Bookshelf BSP and Device Driver Development Guide

Copyright © 1988-2004 OAR Corporation