Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
camera_app/mt9d111/i2cconfig.h@14:90603ea1e85b, 2015-08-25 (annotated)
- Committer:
- dflet
- Date:
- Tue Aug 25 22:03:00 2015 +0000
- Revision:
- 14:90603ea1e85b
- Parent:
- 13:bf45f592c2b6
I2C now works. 2 Cams added only the ov2640 works for now, many changes everywhere in the cam app. Still filled with debug.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dflet | 0:50cedd586816 | 1 | //***************************************************************************** |
dflet | 0:50cedd586816 | 2 | // i2cconfig.h |
dflet | 0:50cedd586816 | 3 | // |
dflet | 0:50cedd586816 | 4 | // Function prototype for I2c interface APIs |
dflet | 0:50cedd586816 | 5 | // |
dflet | 0:50cedd586816 | 6 | // Copyright (C) 2014 Texas Instruments Incorporated - http://www.ti.com/ |
dflet | 0:50cedd586816 | 7 | // |
dflet | 0:50cedd586816 | 8 | // |
dflet | 0:50cedd586816 | 9 | // Redistribution and use in source and binary forms, with or without |
dflet | 0:50cedd586816 | 10 | // modification, are permitted provided that the following conditions |
dflet | 0:50cedd586816 | 11 | // are met: |
dflet | 0:50cedd586816 | 12 | // |
dflet | 0:50cedd586816 | 13 | // Redistributions of source code must retain the above copyright |
dflet | 0:50cedd586816 | 14 | // notice, this list of conditions and the following disclaimer. |
dflet | 0:50cedd586816 | 15 | // |
dflet | 0:50cedd586816 | 16 | // Redistributions in binary form must reproduce the above copyright |
dflet | 0:50cedd586816 | 17 | // notice, this list of conditions and the following disclaimer in the |
dflet | 0:50cedd586816 | 18 | // documentation and/or other materials provided with the |
dflet | 0:50cedd586816 | 19 | // distribution. |
dflet | 0:50cedd586816 | 20 | // |
dflet | 0:50cedd586816 | 21 | // Neither the name of Texas Instruments Incorporated nor the names of |
dflet | 0:50cedd586816 | 22 | // its contributors may be used to endorse or promote products derived |
dflet | 0:50cedd586816 | 23 | // from this software without specific prior written permission. |
dflet | 0:50cedd586816 | 24 | // |
dflet | 0:50cedd586816 | 25 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
dflet | 0:50cedd586816 | 26 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
dflet | 0:50cedd586816 | 27 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
dflet | 0:50cedd586816 | 28 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
dflet | 0:50cedd586816 | 29 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
dflet | 0:50cedd586816 | 30 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
dflet | 0:50cedd586816 | 31 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
dflet | 0:50cedd586816 | 32 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
dflet | 0:50cedd586816 | 33 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
dflet | 0:50cedd586816 | 34 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
dflet | 0:50cedd586816 | 35 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
dflet | 0:50cedd586816 | 36 | // |
dflet | 0:50cedd586816 | 37 | //***************************************************************************** |
dflet | 0:50cedd586816 | 38 | |
dflet | 0:50cedd586816 | 39 | #ifndef __I2CCONFIG_H__ |
dflet | 0:50cedd586816 | 40 | #define __I2CCONFIG_H__ |
dflet | 0:50cedd586816 | 41 | |
dflet | 0:50cedd586816 | 42 | //***************************************************************************** |
dflet | 0:50cedd586816 | 43 | // |
dflet | 0:50cedd586816 | 44 | // If building with a C++ compiler, make all of the definitions in this header |
dflet | 0:50cedd586816 | 45 | // have a C binding. |
dflet | 0:50cedd586816 | 46 | // |
dflet | 0:50cedd586816 | 47 | //***************************************************************************** |
dflet | 0:50cedd586816 | 48 | #ifdef __cplusplus |
dflet | 0:50cedd586816 | 49 | extern "C" |
dflet | 0:50cedd586816 | 50 | { |
dflet | 0:50cedd586816 | 51 | #endif |
dflet | 0:50cedd586816 | 52 | |
dflet | 0:50cedd586816 | 53 | //****************************************************************************** |
dflet | 0:50cedd586816 | 54 | // Macros |
dflet | 0:50cedd586816 | 55 | //****************************************************************************** |
dflet | 0:50cedd586816 | 56 | #define I2C_SEND_STOP 0x01 |
dflet | 0:50cedd586816 | 57 | #define I2C_SEND_START 0x02 |
dflet | 0:50cedd586816 | 58 | |
dflet | 0:50cedd586816 | 59 | //****************************************************************************** |
dflet | 0:50cedd586816 | 60 | // APIs |
dflet | 0:50cedd586816 | 61 | //****************************************************************************** |
dflet | 0:50cedd586816 | 62 | uint32_t I2CInit(void); |
dflet | 13:bf45f592c2b6 | 63 | int32_t I2CBufferRead(int32_t ucDevAddr, uint8_t *ucBuffer, |
dflet | 0:50cedd586816 | 64 | int32_t ulSize,unsigned char ucFlags); |
dflet | 13:bf45f592c2b6 | 65 | int32_t I2CBufferWrite(int32_t ucDevAddr, uint8_t *ucBuffer, |
dflet | 0:50cedd586816 | 66 | int32_t ulSize,unsigned char ucFlags); |
dflet | 0:50cedd586816 | 67 | //***************************************************************************** |
dflet | 0:50cedd586816 | 68 | // |
dflet | 0:50cedd586816 | 69 | // Mark the end of the C bindings section for C++ compilers. |
dflet | 0:50cedd586816 | 70 | // |
dflet | 0:50cedd586816 | 71 | //***************************************************************************** |
dflet | 0:50cedd586816 | 72 | #ifdef __cplusplus |
dflet | 0:50cedd586816 | 73 | } |
dflet | 0:50cedd586816 | 74 | #endif |
dflet | 0:50cedd586816 | 75 | |
dflet | 0:50cedd586816 | 76 | #endif //__I2CCONFIG_H__ |
dflet | 0:50cedd586816 | 77 |