David Fletcher / Mbed 2 deprecated cc3100_Test_websock_Camera_CM4F

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers i2cconfig.h Source File

i2cconfig.h

00001 //*****************************************************************************
00002 // i2cconfig.h
00003 //
00004 // Function prototype for I2c interface APIs
00005 //
00006 // Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/ 
00007 // 
00008 // 
00009 //  Redistribution and use in source and binary forms, with or without 
00010 //  modification, are permitted provided that the following conditions 
00011 //  are met:
00012 //
00013 //    Redistributions of source code must retain the above copyright 
00014 //    notice, this list of conditions and the following disclaimer.
00015 //
00016 //    Redistributions in binary form must reproduce the above copyright
00017 //    notice, this list of conditions and the following disclaimer in the 
00018 //    documentation and/or other materials provided with the   
00019 //    distribution.
00020 //
00021 //    Neither the name of Texas Instruments Incorporated nor the names of
00022 //    its contributors may be used to endorse or promote products derived
00023 //    from this software without specific prior written permission.
00024 //
00025 //  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
00026 //  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
00027 //  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00028 //  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
00029 //  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
00030 //  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
00031 //  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00032 //  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00033 //  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
00034 //  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
00035 //  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00036 //
00037 //*****************************************************************************
00038 
00039 #ifndef __I2CCONFIG_H__
00040 #define __I2CCONFIG_H__
00041 
00042 //*****************************************************************************
00043 //
00044 // If building with a C++ compiler, make all of the definitions in this header
00045 // have a C binding.
00046 //
00047 //*****************************************************************************
00048 #ifdef __cplusplus
00049 extern "C"
00050 {
00051 #endif
00052 
00053 //******************************************************************************
00054 // Macros
00055 //******************************************************************************
00056 #define I2C_SEND_STOP      0x01
00057 #define I2C_SEND_START     0x02
00058 
00059 //******************************************************************************
00060 // APIs
00061 //******************************************************************************
00062 uint32_t I2CInit(void);
00063 int32_t I2CBufferRead(int32_t ucDevAddr, uint8_t *ucBuffer,
00064                             int32_t ulSize,unsigned char ucFlags);
00065 int32_t I2CBufferWrite(int32_t ucDevAddr, uint8_t *ucBuffer,
00066                              int32_t ulSize,unsigned char ucFlags);
00067 //*****************************************************************************
00068 //
00069 // Mark the end of the C bindings section for C++ compilers.
00070 //
00071 //*****************************************************************************
00072 #ifdef __cplusplus
00073 }
00074 #endif
00075 
00076 #endif //__I2CCONFIG_H__
00077