#ifndef _CAMERA_CFG_H #define _CAMERA_CFG_H #ifdef __cplusplus extern "C" { #endif typedef struct { void* GPIOx; uint16_t GPIO_PIN_x; //0-15 } GPIO_Info; typedef struct { GPIO_Info I2C_SCL; GPIO_Info I2C_SDA; GPIO_Info Camera_PowerControl; GPIO_Info Camera_Reset; uint8_t Camera_ClockSource; } Camera_Info; /** * @brief initilize camera * @param[in] pCameraInfo: Camera_Info struct, the struct of camera information * This struct contains the following parameters: * @param[in] I2C_SCL, I2C_SDA, Camera_PowerControl, Camera_Reset: GPIO_Info strcut, the struct of GPIO information * This struct contains the following parameters: * @param[in] *GPIOx: t he address of GPIO * This parameter can be one of the following values: * @arg GPIO_GROUP1_BASE_ADDR * @arg GPIO_GROUP2_BASE_ADDR * @arg GPIO_GROUP3_BASE_ADDR * @arg GPIO_GROUP4_BASE_ADDR * @arg GPIO_GROUP5_BASE_ADDR * @param[in] GPIO_PIN_x: the number of GPIO * This parameter can be one of the following values: * @arg 0-15 * @param[in] Camera_ClockSource: the num of GPIO interface * This parameter can be one of the following values: * @arg 0 :outPut clock form GPIO3 * @arg 1 :outPut clock form GPIO4 * @param[in] Camera_Type: the type of camera * This parameter can be one of the following values: * @arg 0 :CAMERA_BF2013 * @arg 1 :CAMERA_GC0308 * @arg 2 :CAMERA_BF3007 * @retval * @arg 00 :success * @arg 01 :GPIOx initialization error * @arg 02 :GPIO_PIN_x initialization error * @arg 03 :Camera_ClockSource initialization error * @arg 04 :Camera_Type initialization error * @note */ uint8_t TMC_CAMERA_Init(Camera_Info *pCameraInfo); void GetCameraLibVersion( uint8_t *pVersionBuf ); #ifdef __cplusplus } #endif #endif /* _CAMERA_CFG_H */