Home | History | Annotate | Download | only in linux
      1 /*
      2  * Copyright (C) 2016 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #include <errno.h>
     18 #include <stdint.h>
     19 #include <gpio.h>
     20 #include <i2c.h>
     21 #include <seos.h>
     22 #include <util.h>
     23 #include <atomicBitset.h>
     24 #include <atomic.h>
     25 
     26 
     27 
     28 
     29 int i2cMasterRequest(I2cBus busId, I2cSpeed speed)
     30 {
     31     return -EINVAL;
     32 }
     33 
     34 int i2cMasterRelease(I2cBus busId)
     35 {
     36     return -EINVAL;
     37 }
     38 
     39 int i2cMasterTxRx(I2cBus busId, I2cAddr addr,
     40         const void *txBuf, size_t txSize, void *rxBuf, size_t rxSize,
     41         I2cCallbackF callback, void *cookie)
     42 {
     43     return -EINVAL;
     44 }
     45 
     46 int i2cSlaveRequest(I2cBus busId, I2cAddr addr)
     47 {
     48     return -EINVAL;
     49 }
     50 
     51 int i2cSlaveRelease(I2cBus busId)
     52 {
     53     return -EINVAL;
     54 }
     55 
     56 void i2cSlaveEnableRx(I2cBus busId, void *rxBuf, size_t rxSize,
     57         I2cCallbackF callback, void *cookie)
     58 {
     59     //
     60 }
     61 
     62 int i2cSlaveTxPreamble(I2cBus busId, uint8_t byte, I2cCallbackF callback, void *cookie)
     63 {
     64     return -EBUSY;
     65 }
     66 
     67 int i2cSlaveTxPacket(I2cBus busId, const void *txBuf, size_t txSize, I2cCallbackF callback, void *cookie)
     68 {
     69     return -EBUSY;
     70 }
     71