---
title: IOFBCopyI2CInterfaceForBus
framework: IOKit
role: symbol
role_heading: Function
platforms: [Mac Catalyst 13.0+, macOS 10.3+]
path: iokit/1410345-iofbcopyi2cinterfaceforbus
---

# IOFBCopyI2CInterfaceForBus

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

## Declaration

```occ
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

Return Value An IOReturn code.

## Discussion

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](iokit/1410333-iofbgeti2cinterfacecount.md)
- [IOI2CInterfaceClose](iokit/1410390-ioi2cinterfaceclose.md)
- [IOI2CInterfaceOpen](iokit/1410388-ioi2cinterfaceopen.md)
- [IOI2CSendRequest](iokit/1410373-ioi2csendrequest.md)
