| /* |
| * Copyright (C) 2013 Google, Inc. |
| * |
| * Licensed under the Apache License, Version 2.0 (the "License"); |
| * you may not use this file except in compliance with the License. |
| * You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, software |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| * See the License for the specific language governing permissions and |
| * limitations under the License. |
| */ |
| |
| package android.hardware; |
| |
| import android.hardware.I2cTransaction; |
| |
| /** |
| * For platform internal use only. App developers: see I2cManager.java. |
| * @hide */ |
| interface II2cManager |
| { |
| /* Returns names of all available I2C buses. */ |
| String[] getI2cBuses(); |
| |
| /* Perform transactions on the I2C bus. |
| * |
| * @param name I2C bus to perform transactions on. |
| * @param address I2C 7-bit address to perform transactions with, |
| * in bottom 7 bits. |
| * @param txns Transactions to handle (input/output to perform). |
| * @return 0 on success, negative on error. |
| */ |
| int performTransactions(String name, int address, inout I2cTransaction[] txns); |
| } |