www.pudn.com > camera.rar > qci_private.h


// 
// Copyright (c) Microsoft Corporation.  All rights reserved. 
// 
// 
// Use of this sample source code is subject to the terms of the Microsoft 
// license agreement under which you licensed this sample source code. If 
// you did not accept the terms of the license agreement, you are not 
// authorized to use this sample source code. For the terms of the license, 
// please see the license agreement between you and Microsoft or, if applicable, 
// see the LICENSE.RTF on your install media or the root of your tools installation. 
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES. 
// 
// 
// (C) Copyright 2006 Marvell International Ltd. 
// All Rights Reserved 
// 
 
#ifndef __QCI_PRIVATE_H__ 
#define __QCI_PRIVATE_H__ 
#include "BSP_CommonDefs.h" 
//#include "ost.h" 
#include "Camera_SOC.h" 
#include "CI.h" 
#include "QCI.h" 
#include "i2c_SOC.h"  
#include "GPIO_platform.h" 
#include "GPIO_SOC.h" 
#include "I2C_DRV.h"  
 
 
#ifdef DEBUG 
 
#define DEBUGMASK(bit)       (1 << (bit)) 
 
#define MASK_ERROR           DEBUGMASK(0) 
#define MASK_WARN            DEBUGMASK(1) 
#define MASK_INIT            DEBUGMASK(2) 
#define MASK_FUNCTION        DEBUGMASK(3) 
#define MASK_IOCTL           DEBUGMASK(4) 
#define MASK_DEVICE          DEBUGMASK(5) 
 
 
#define ZONE_ERROR           DEBUGZONE(0) 
#define ZONE_WARN            DEBUGZONE(1) 
#define ZONE_INIT            DEBUGZONE(2) 
#define ZONE_FUNCTION        DEBUGZONE(3) 
#define ZONE_IOCTL           DEBUGZONE(4) 
#define ZONE_DEVICE          DEBUGZONE(5) 
#define ZONE_ENUM            DEBUGZONE(6) 
 
 
 
 
#endif 
 
#ifdef __cplusplus 
extern "C"{ 
#endif  
 
//extern UINT clk_reg; 
//extern UINT ost_reg; 
PXA_CI_REGS *g_pCIRegs; 
extern HANDLE qci_intr_event; 
extern DWORD qci_sys_intr; 
extern int still_skips; 
 
#define HISTOGRAM_LUT_BUF_SIZE    1024 
 
typedef struct 
{ 
    char histogram_lut_buf[HISTOGRAM_LUT_BUF_SIZE]; 
    PXA_CI_DMAC_DESCRIPTOR_T histogram_lut_descriptor; 
} histogram_lut_buf_t; 
 
 
BOOL QCIInitAll(); 
void QCIPowerOn(); 
void QCIClockEnable(BOOL is_on); 
void QCIEnable(); 
void QCICaptureStart(int in_still_skips); 
void QCICaptureStop(); 
void QCISetInterface(qci_interface_t* intf); 
void QCISetMasterTiming(qci_master_timing_t* timing); 
void QCISetImageFormat(int in_format, int out_format); 
BOOL QCIAddCallBack(callback_data_t* callback_data); 
void QCIImageProcCfg(qci_image_proc_cfg_t* cfg); 
BOOL QCIDMAPrepareFormat(format_t* format); 
BOOL QCIDMASetFrameFormat(format_t* format); 
 
 
void DMALoad(); 
void DMABufAlloc(dma_buf_t *buf, UINT32 size, BOOL cache); 
void DMABufFree(dma_buf_t *buf); 
 
 
void QciCallBack(frame_t* frame); 
DWORD WINAPI QciIntrThread(); 
 
 
#ifdef __cplusplus 
} 
#endif  
 
#endif