Function

IOI2CInterfaceOpen

Opens an instance of an I2C bus interface, allowing I2C requests to be made.

Declaration

IOReturn IOI2CInterfaceOpen(io_service_t interface, IOOptionBits options, IOI2CConnectRef *connect);

Parameters

interface

An I2C bus interface (see IOFBCopyI2CInterfaceForBus). The interface may be released after this call is made.

options

Pass kNilOptions.

connect

The opaque IOI2CConnectRef is returned, for use with IOI2CSendRequest() and IOI2CInterfaceClose().

Return Value

An IOReturn code.

Discussion

An instance of an I2C bus interface, obtained by IOFBCopyI2CInterfaceForBus, is opened with this function allowing I2C requests to be made.

See Also

Miscellaneous

IOFBCopyI2CInterfaceForBus

Returns an instance of an I2C bus interface, associated with an IOFramebuffer instance / bus index pair.

IOFBGetI2CInterfaceCount

Returns a count of I2C interfaces available associated with an IOFramebuffer instance.

IOI2CInterfaceClose

Closes an IOI2CConnectRef.

IOI2CSendRequest

Carries out the I2C transaction specified by an IOI2CRequest structure.