/**************************************************************************//** * @file cap.h * @version V1.00 * $Revision: 2 $ * $Date: 15/06/12 8:48a $ * @brief N9H30 CAP driver header file * * @note * SPDX-License-Identifier: Apache-2.0 * Copyright (C) 2015 Nuvoton Technology Corp. All rights reserved. *****************************************************************************/ #ifndef __NU_CAP_H__ #define __NU_CAP_H__ // #include header file #ifdef __cplusplus extern "C" { #endif /** @addtogroup N9H30_Device_Driver N9H30 Device Driver @{ */ /** @addtogroup N9H30_CAP_Driver CAP Driver @{ */ /** @addtogroup N9H30_CAP_EXPORTED_CONSTANTS CAP Exported Constants @{ */ /* Define data type (struct, union? */ // #define Constant #include "N9H30.h" #include "nu_sys.h" /*---------------------------------------------------------------------------------------------------------*/ /* CAP_CTL constant definitions */ /*---------------------------------------------------------------------------------------------------------*/ #define CAPEN BIT0 /*!< Interrupt enable for VPE operations */ #define ADDRSW BIT3 /*!< Packet Buffer Address Switch */ #define PLNEN BIT5 /*!< Planar Output Enable */ #define PKTEN BIT6 /*!< Packet Output Enable */ #define SHUTTER BIT16 /*!< Image Capture Interface Automatically Disable The Capture Inteface After A Frame Had Been Captured */ #define UPDATE BIT20 /*!< Update Register At New Frame */ #define VPRST BIT24 /*!< Capture Interface Reset */ /*---------------------------------------------------------------------------------------------------------*/ /* CAP_PAR constant definitions */ /*---------------------------------------------------------------------------------------------------------*/ #define INFMT BIT0 /*!< Sensor Input Data Format */ #define SENTYPE BIT1 /*!< Sensor Input Type */ #define INDATORD (BIT2|BIT3) /*!< Sensor Input Data Order */ #define OUTFMT (BIT4|BIT5) /*!< Image Data Format Output To System Memory */ #define RANGE BIT6 /*!< Scale Input YUV CCIR601 Color Range To Full Range */ #define PLNFMT BIT7 /*!< Planar Output YUV Format */ #define PCLKP BIT8 /*!< Sensor Pixel Clock Polarity */ #define HSP BIT9 /*!< Sensor Hsync Polarity */ #define VSP BIT10 /*!< Sensor Vsync Polarity */ #define COLORCTL (BIT11|BIT12) /*!< Special COLORCTL Processing */ #define FBB BIT18 /*!< Field By Blank */ /*---------------------------------------------------------------------------------------------------------*/ /* CAP_INT constant definitions */ /*---------------------------------------------------------------------------------------------------------*/ #define MDIEN BIT20 /*!< Motion Detection Output Finish Interrupt Enable */ #define ADDRMIEN BIT19 /*!< Address Match Interrupt Enable */ #define MEIEN BIT17 /*!< System Memory Error Interrupt Enable */ #define VIEN BIT16 /*!< Video Frame End Interrupt Enable */ #define MDINTF BIT4 /*!< Motion Detection Output Finish Interrupt */ #define ADDRMINTF BIT3 /*!< Memory Address Match Interrupt */ #define MEINTF BIT1 /*!< Bus Master Transfer Error Interrupt */ #define VINTF BIT0 /*!< Video Frame End Interrupt */ /*---------------------------------------------------------------------------------------------------------*/ /* CAP_MD constant definitions */ /*---------------------------------------------------------------------------------------------------------*/ #define MDEN BIT0 /*!< Motion Detection Enable */ #define MDBS BIT8 /*!< Motion Detection Block Size */ #define MDSM BIT9 /*!< Motion Detection Save Mode */ #define MDDF (BIT10|BIT11) /*!< Motion Detection Detect Frequency */ #define MDTHR (BIT16|BIT17|BIT18|BIT19|BIT20) /*!< Motion Detection Differential Threshold */ /*---------------------------------------------------------------------------------------------------------*/ /* CAP_CWSP constant definitions */ /*---------------------------------------------------------------------------------------------------------*/ #define CWSADDRH (0xFFF<<0) /*!