ADC Home > Reference Library > Reference > Darwin > Kernel Framework Reference
|
IOATADevConfig |
Inherits from: | |
Declared In: |
Used for configuring and communicating the desired transfer modes of a device.
A disk driver would typically use this object in conjunction with the 512-bytes of identification data from the drive and the IOATABusInfo object for the bus it is connected to. This object will determine the best matching transfer speeds available. The device driver will then send a series of Set Features commands to configure the drive and this object to the bus through the IOATADevice nub in order to configure the optimum transfer mode. The driver for the disk drive may choose to populate this object with whatever transfer mode desired, in the event that a different mode is required. Usually use the initWithBestSelection to make a best mode match. The Mode accessors use bit significance to indicate a selected mode or supported modes(s) ie, 00000001b indicates Mode-0, 00000010b indicates mode 1, etc. Selected mode is indicated by a single set bit. No bit set indicates no mode in that class is selected. In other words, a bus will support multiple possible modes, but will only have one mode selected at that time.
Static creator function.
Converts a bit-significant field to a numerical value.
Handy initializer.
Tells the bus controller whether to wait for packet acceptance or set pending interrupt.
atadevconfig |
Static creator function.
public
static IOATADevConfig* atadevconfig( void);
bitSigToNumeric |
Converts a bit-significant field to a numerical value.
public
virtual UInt8 bitSigToNumeric( UInt16 binary);
binary
the bit significant field.
Returns the numerical value of the highest bit set in the field.
Note that a bit field of 0x00 has no defined result.
getDMACycleTime |
public
UInt16 getDMACycleTime( void );
Returns reported multiword DMA cycle time in nanoseconds.
getDMAMode |
public
UInt8 getDMAMode( void );
Returns bit-significant map of DMA mode.
getPacketConfig |
public
atapiConfig getPacketConfig( void );
Returns atapiConfig as defined in IOATATypes.h
getPIOCycleTime |
public
UInt16 getPIOCycleTime( void );
Returns reported PIO CycleTime in nanoseconds.
getPIOMode |
public
UInt8 getPIOMode( void );
Returns bit-significant map of PIO mode.
getUltraMode |
public
UInt8 getUltraMode( void );
Returns bit-significant map of Ultra mode.
initWithBestSelection |
Handy initializer.
public
IOReturn initWithBestSelection( const UInt16* identifyData, IOATABusInfo* busInfo);
identifyData
512 Bytes of data obtained from the device via IDENTIFY DEVICE or IDENTIFY PACKET DEVICE command.
busInfo
Pointer to an IOATAbusInfo object obtained from a previous atanub->provideBusInfo() call.
Returns kIOSuccess (0) when a matching transfer mode is available between the device and controller.
Pass the 512-byte result of the Identify Device or Identify Packet Device in endian-order for your platform (byte-swapped on PPC) and the IOATABusInfo object for the bus. The object will initialize all fields and select the best transfer modes that match on bus and device. If the return value was 0 (success or noErr), then a matching mode is supported. Examine the PIO and UDMA/DMA fields and to generate the apropriate SET FEATURES parameters for your drive and send this initialized object to the IOATAController when requesting a speed configuration. Failure of this method means no supported transfer modes matched between bus and device info.
setDMACycleTime |
public
void setDMACycleTime( UInt16 inNS );
inNS
Reported multiword DMA Cycle time in nanoseconds.
setDMAMode |
public
void setDMAMode( UInt8 inModeBitMap );
inModeBitMap
Bit-significant map of DMA mode.
setPacketConfig |
Tells the bus controller whether to wait for packet acceptance or set pending interrupt.
public
void setPacketConfig ( atapiConfig packetConfig);
packetConfig
For ATAPI devices, if the device asserts interrupt after the Packet Command when it is ready to accept the packet, set this value to true (mostly older devices). If the device accepts the packet only by asserting DRQ bit in status, then set this value false.
setPIOCycleTime |
public
void setPIOCycleTime( UInt16 inNS );
inNS
PIO cycle time in nanoseconds.
setPIOMode |
public
void setPIOMode( UInt8 inModeBitMap);
inModeBitMap
Bit-significant map of PIO mode.
setUltraMode |
public
void setUltraMode( UInt8 inModeBitMap );
inModeBitMap
Bit-significant map of Ultra mode.
ExpansionData |
protected
struct ExpansionData { };
This structure will be used to expand the capablilties of the IOWorkLoop in the future.
reserved |
protected
ExpansionData *reserved;
Reserved for future use. (Internal use only)
|
Last Updated: 2008-12-19