Function

IOFBCopyI2CInterfaceForBus

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

Declaration

IOReturn IOFBCopyI2CInterfaceForBus(io_service_t framebuffer, IOOptionBits bus, io_service_t *interface);

Parameters

bus

The zero based index of the bus on the requested framebuffer.

interface

The interface instance is returned. The caller should release this instance with IOObjectRelease().

Return Value

An IOReturn code.

Discussion

Some graphics devices will allow access to an I2C bus routed through a display connector in order to control external devices on that bus. This function returns an instance of an I2C bus interface, associated with an IOFramebuffer instance / bus index pair. The number of I2C buses is available from the IOFBGetI2CInterfaceCount() call. The interface may be used with the IOI2CInterfaceOpen/Close/SendRequest() calls to carry out I2C transactions on that bus. Not all graphics devices support this functionality.

See Also

Miscellaneous

IOFBGetI2CInterfaceCount

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

IOI2CInterfaceClose

Closes an IOI2CConnectRef.

IOI2CInterfaceOpen

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

IOI2CSendRequest

Carries out the I2C transaction specified by an IOI2CRequest structure.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software