Copyright ©1995 by NeXT Computer, Inc.  All Rights Reserved.

IODeviceDescription



Inherits From: Object
Declared In: driverkit/IODeviceDescription.h



Class Description

IODeviceDescription objects are used to encapsulate information about an IODevice object. Usually, you need only to pass around IODeviceDescription objects, without creating them, subclassing them, or sending messages to them. The main purpose of an IODeviceDescription object is to describe an IODirectDevice. However, IODeviceDescriptions are also used at probe: time to describe indirect drivers (specifically, to specify the IODirectDevice that the indirect driver might want to work with).

Each architecture has its own subclass of IODeviceDescription that contains architecture-specific information:

Architecture IODeviceDescription Subclass
ISA and EISA Intel-based IOEISADeviceDescription
PCI IOPCIDeviceDescription
PCMCIA IOPCMCIADeviceDescription



Instance Variables

None declared in this class.



Method Types

Getting and setting the list of interrupts
interrupt
interruptList
numInterrupts
setInterruptList:num:
Getting and setting the list of memory ranges
memoryRangeList
numMemoryRanges
setMemoryRangeList:num:
Getting and setting the port devicePort
setDevicePort:
Getting and setting the direct device
directDevice
setDirectDevice:
Getting and setting the configuration table
configTable
setConfigTable:



Instance Methods

configTable
(IOConfigTable *)configTable

Returns the table of configuration information for this driver instance.

See also:  setConfigTable:



devicePort
(port_t)devicePort

Returns the device port associated with the device. This port is used by the Driver Kit. You shouldn't need to invoke this method if your driver uses only supported Driver Kit API.

Holding send rights to the device port gives a task rights to access a device's registers, to program its DMA channel, and receive interrupt notification. The kernel responds to requests sent on this port to provide these services to the requesting task. Device ports are created early in system initialization and passed out to the appropriate device drivers at configuration time.

See also:  setDevicePort:



directDevice
directDevice

If the driver instance described by IODeviceDescription is an indirect device driver, this method returns the IODevice object to which this driver instance is connected. Usually, the returned object is an IODirectDevice; however, this isn't required. If this IODeviceDescription's object is a direct or pseudo device driver, this method returns nil.

See also:  setDirectDevice:



interrupt
(unsigned int)interrupt

Returns the first interrupt (IRQ) associated with this device. The return value is undefined if this device has no interrupts associated with it.

See also:  interruptList, numInterrupts, setInterruptList:num:



interruptList
(unsigned int *)interruptList

Returns all the interrupts (IRQs) associated with this device. You can get the number of items in the returned array by invoking numInterrupts. You should never free the data returned by this method.

See also:  interrupt, numInterrupts, setInterruptList:num:



memoryRangeList
(IORange *)memoryRangeList

Returns all the memory ranges associated with this device. You can get the number of items in the returned array by invoking numMemoryRanges. You should never free the data returned by this method.

See also:  numMemoryRanges, setMemoryRangeList:num:



numInterrupts
(unsigned int)numInterrupts

Returns the total number of interrupts (IRQs) associated with this device.

See also:  interrupt, interruptList, setInterruptList:num:



numMemoryRanges
(unsigned int)numMemoryRanges

Returns the total number of memory ranges associated with this device.

See also:  memoryRangeList, setMemoryRangeList:num:



setConfigTable:
(void)setConfigTable:(IOConfigTable *)configTable

Sets the table of configuration information for this driver instance. In normal use of the Driver Kit, you should never invoke this method.

See also:  configTable



setDevicePort:
(void)setDevicePort:(port_t)devicePort

Sets the device port for this driver instance. In normal use of the Driver Kit, you should never invoke this method.

See also:  devicePort



setDirectDevice:
(void)setDirectDevice:directDevice

Records directDevice as the IODevice object that is connected to the driver instance that this IODeviceDescription describes. In normal use of the Driver Kit, you should never invoke this method.

See also:  directDevice



setInterruptList:num:
(IOReturn)setInterruptList:(unsigned int *)aList num:(unsigned int)numInterrupts

Sets the array and number of interrupts (IRQs) associated with this device. You shouldn't normally invoke this method, since it overrides the normal configuration scheme (which is documented in Chapter 4).

See also:  interrupt, interruptList, numInterrupts



setMemoryRangeList:num:
(IOReturn)setMemoryRangeList:(IORange *)aList num:(unsigned int)numMemoryRanges

Sets the array and number of memory ranges associated with this device. You shouldn't normally invoke this method, since it overrides the normal configuration scheme (which is documented in Chapter 4).

See also:  memoryRangeList, numMemoryRanges