#ifndef __DEV_CAMERA_H__
#define __DEV_CAMERA_H__

#include "sp2cw3.h"

/*******************************************************************************
 * Auto-generated Content
 ******************************************************************************/


/***********************************CAMERA_CTL***********************************/
#define DEV_CAMERA_CTL_Camera_mode_YUV422                       (0x0UL<<17)
#define DEV_CAMERA_CTL_Camera_mode_RGB565                       (0x1UL<<17)
#define DEV_CAMERA_CTL_Camera_mode_RAW8                         (0x2UL<<17)
#define DEV_CAMERA_CTL_Camera_mode_MASK                         (0x3UL<<17)
#define DEV_CAMERA_CTL_DELAY_CHAIN_MASK                         (0x1fUL<<12)
#define DEV_CAMERA_CTL_Camera_SWAP_DISABLE                      (0x0UL<<11)
#define DEV_CAMERA_CTL_Camera_SWAP_ENABLE                       (0x1UL<<11)
#define DEV_CAMERA_CTL_Camera_SWAP_MASK                         (0x1UL<<11)
#define DEV_CAMERA_CTL_RX_FIFO_THR_MASK                         (0x1fUL<<6)
#define DEV_CAMERA_CTL_RX_FIFO_RST_WORK                         (0x0UL<<5)
#define DEV_CAMERA_CTL_RX_FIFO_RST_RESET                        (0x1UL<<5)
#define DEV_CAMERA_CTL_RX_FIFO_RST_MASK                         (0x1UL<<5)
#define DEV_CAMERA_CTL_WORK_MODE_SINGLE                         (0x0UL<<3)
#define DEV_CAMERA_CTL_WORK_MODE_DUAL                           (0x1UL<<3)
#define DEV_CAMERA_CTL_WORK_MODE_QUAD                           (0x2UL<<3)
#define DEV_CAMERA_CTL_WORK_MODE_MASK                           (0x3UL<<3)
#define DEV_CAMERA_CTL_FREE_CLK_MODE_STANDARDCLK                (0x0UL<<2)
#define DEV_CAMERA_CTL_FREE_CLK_MODE_FREECLK                    (0x1UL<<2)
#define DEV_CAMERA_CTL_FREE_CLK_MODE_MASK                       (0x1UL<<2)
#define DEV_CAMERA_CTL_CAMERA_TYPE_MTK_MODE                     (0x0UL<<1)
#define DEV_CAMERA_CTL_CAMERA_TYPE_GC_MODE                      (0x1UL<<1)
#define DEV_CAMERA_CTL_CAMERA_TYPE_MASK                         (0x1UL<<1)
#define DEV_CAMERA_CTL_CAMERA_EN_DISABLE                        (0x0UL<<0)
#define DEV_CAMERA_CTL_CAMERA_EN_ENABLE                         (0x1UL<<0)
#define DEV_CAMERA_CTL_CAMERA_EN_MASK                           (0x1UL<<0)
/****CAMERA_CTL end****/


/***********************************CAMERA_STA***********************************/
#define DEV_CAMERA_STA_RX_EMPTY                                 (0x1UL<<10)
#define DEV_CAMERA_STA_RX_FULL                                  (0x1UL<<9)
#define DEV_CAMERA_STA_RX_LEVEL_MASK                            (0x1fUL<<4)
#define DEV_CAMERA_STA_DATA_TYPE_YUV422                         (0x0UL<<2)
#define DEV_CAMERA_STA_DATA_TYPE_RGB565                         (0x1UL<<2)
#define DEV_CAMERA_STA_DATA_TYPE_RAW8                           (0x2UL<<2)
#define DEV_CAMERA_STA_DATA_TYPE_MASK                           (0x3UL<<2)
#define DEV_CAMERA_STA_CAMERA_STA_CAMERA_IDLE                   (0x0UL<<1)
#define DEV_CAMERA_STA_CAMERA_STA_CAMERA_BUSY                   (0x1UL<<1)
#define DEV_CAMERA_STA_CAMERA_STA_MASK                          (0x1UL<<1)
#define DEV_CAMERA_STA_CAMERA_WORK_STOP                         (0x0UL<<0)
#define DEV_CAMERA_STA_CAMERA_WORK_WORKED                       (0x1UL<<0)
#define DEV_CAMERA_STA_CAMERA_WORK_MASK                         (0x1UL<<0)
/****CAMERA_STA end****/


/***********************************CAMERA_RANGE***********************************/
#define DEV_CAMERA_RANGE_IMAGE_WIDTH_MASK                       (0xffffUL<<16)
#define DEV_CAMERA_RANGE_IMAGE_HEIGHT_MASK                      (0xffffUL<<0)
/****CAMERA_RANGE end****/


/***********************************CAMERA_RX_DATA***********************************/
#define DEV_CAMERA_RX_DATA_MASK                                 (0xffUL<<0)
/****CAMERA_RX_DATA end****/


/***********************************CAMERA_IE***********************************/
#define DEV_CAMERA_IE_RX_DMA_EN                                 (0x1UL<<7)
#define DEV_CAMERA_IE_RXRange                                   (0x1UL<<4)
#define DEV_CAMERA_IE_RX_UF                                     (0x1UL<<3)
#define DEV_CAMERA_IE_RX_OF                                     (0x1UL<<2)
#define DEV_CAMERA_IE_RX_END                                    (0x1UL<<1)
#define DEV_CAMERA_IE_RX_THR                                    (0x1UL<<0)
/****CAMERA_IE end****/


/***********************************CAMERA_PD***********************************/
#define DEV_CAMERA_PD_RX_RANGE_ERR                              (0x1UL<<4)
#define DEV_CAMERA_PD_RX_UF                                     (0x1UL<<3)
#define DEV_CAMERA_PD_RX_OF                                     (0x1UL<<2)
#define DEV_CAMERA_PD_RX_END                                    (0x1UL<<1)
#define DEV_CAMERA_PD_RX_THR                                    (0x1UL<<0)
/****CAMERA_PD end****/


/***********************************CAMERA_RANGE_CNT***********************************/
#define DEV_CAMERA_RANGE_CNT_IMAGE_WIDTH_MASK                   (0xffffUL<<16)
#define DEV_CAMERA_RANGE_CNT_IMAGE_HEIGHT_MASK                  (0xffffUL<<0)
/****CAMERA_RANGE_CNT end****/


/***********************************DEV_CAMERA register***********************************/
typedef struct
{

    __IO    uint32_t    CTL;                                     /* 0x0    CAMERA Control */
    __IO    uint32_t    STA;                                     /* 0x4    CAMERA State */
    __I     uint32_t    RANGE;                                   /* 0x8    CAMERA RANGE */
    __I     uint32_t    RX_DATA;                                 /* 0xc    CAMERA Receive Data */
    __IO    uint32_t    IE;                                      /* 0x10    CAMERA_IE */
    __IO    uint32_t    PD;                                      /* 0x14    CAMERA_PD */
    __I     uint32_t    RANGE_CNT;                               /* 0x18    CAMERA RANGE Counter */
} DEV_CAMERA_RegDef;
/****DEV_CAMERA end****/

/*******************************************************************************
 * User-defined Contents
 ******************************************************************************/



#endif
