for OV5642
Dependencies: EthernetInterface FATFileSystem GR-PEACH_video GraphicsFramework HttpServer_snapshot R_BSP mbed-rpc mbed-rtos mbed
i2c_setting.h
- Committer:
- 1050186
- Date:
- 2015-11-02
- Revision:
- 6:7ec90cc47dc4
- Parent:
- 5:34d84609dd60
- Child:
- 7:c45ecff1b44d
File content as of revision 6:7ec90cc47dc4:
/* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef I2C_SETTING_H #define I2C_SETTING_H //#define DEBUGPRINT_CFG #ifdef DEBUGPRINT_CFG #define DEBUGPRINT printf #else #define DEBUGPRINT #endif #define RECV_BUF_SIZE (1024) #define DATA_ANALY_ERROR (-1) #define REG_REQ_BUF_SIZE (7) #define DATA_MAX_SIZE (32) #define ARG_MAX_NUM (DATA_MAX_SIZE + 2) // I2C addr, len, data1, data2, data3, ... #define ARG_MAX_SIZE (2) // upper bit + lower bit #define NULL_SIZE (1) #define CODE_NULL (0x00) #define NUM_STR_TO_HEX (0x30) #define BIG_STR_TO_HEX (0x37) #define SMA_STR_TO_HEX (0x57) #define MASK_HEX10 (0x10) extern void analy_and_exe(char * buf); extern void SetI2CfromTerm(void const *argument); #endif