Mac Developer Library

Developer

IOATADevConfig Class Reference

Options
Deployment Target:

On This Page
Language:

IOATADevConfig

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. More...

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Not Applicable @import Kernel;

Availability


Available in OS X v10.0 and later.
  • static creator function.

    Declaration

    C++

    static IOATADevConfig* atadevconfig( void);

    Import Statement

  • converts a bit-significant field to a numerical value. Note that a bit field of 0x00 has no defined result.

    Declaration

    C++

    virtual UInt8 bitSigToNumeric( UInt16binary);

    Parameters

    binary

    the bit significant field.

    Return Value

    the numerical value of the highest bit set in the field.

    Import Statement

  • Declaration

    C++

    UInt16 getDMACycleTime( void );

    Return Value

    Reported multiword DMA cycle time in nanoseconds.

    Import Statement

  • Declaration

    C++

    UInt8 getDMAMode( void );

    Return Value

    bit-significant map of DMA mode

    Import Statement

  • Declaration

    C++

    atapiConfig getPacketConfig( void );

    Return Value

    atapiConfig as defined in IOATATypes.h

    Import Statement

  • Declaration

    C++

    UInt16 getPIOCycleTime( void );

    Return Value

    reported PIO CycleTime in nanoseconds.

    Import Statement

  • Declaration

    C++

    UInt8 getPIOMode( void );

    Return Value

    bit-significant map of PIO mode

    Import Statement

  • Declaration

    C++

    UInt8 getUltraMode( void );

    Return Value

    bit-significant map of Ultra mode

    Import Statement

  • Handy initializer: 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 initialised object to the IOATAController when requesting a speed configuration. failure means no supported transfer modes matched between bus and device info.

    Declaration

    C++

    IOReturn initWithBestSelection( const UInt16 *identifyData, IOATABusInfo *busInfo);

    Parameters

    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.

    Return Value

    kIOSuccess (0) when a matching transfer mode is available between the device and controller.

    Import Statement

  • Declaration

    C++

    void setDMACycleTime( UInt16inNS );

    Parameters

    inNS

    reported multiword DMA Cycle time in nanoseconds.

    Import Statement

  • Declaration

    C++

    void setDMAMode( UInt8inModeBitMap );

    Parameters

    inModeBitMap

    bit-significant map of DMA mode

    Import Statement

  • 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. Tells the bus controller whether to wait for packet acceptance or set pending interrupt.

    Declaration

    C++

    void setPacketConfig ( atapiConfigpacketConfig);

    Parameters

    packetConfig

    Import Statement

  • Declaration

    C++

    void setPIOCycleTime( UInt16inNS );

    Parameters

    inNS

    PIO cycle time in nanoseconds.

    Import Statement

  • Declaration

    C++

    void setPIOMode( UInt8inModeBitMap);

    Parameters

    inModeBitMap

    bit-significant map of PIO mode

    Import Statement

  • Declaration

    C++

    void setUltraMode( UInt8inModeBitMap );

    Parameters

    inModeBitMap

    bit-significant map of Ultra mode

    Import Statement

Data Types

  • Declaration

    C++

    struct ExpansionData { };

    Discussion

    This structure will be used to expand the capablilties of the IOWorkLoop in the future.

Instance Variables

  • Reserved for future use. (Internal use only)

    Declaration

    C++

    ExpansionData *reserved;