📄 csl_ccdc.h
字号:
/** The following parameters are REQUIRED. If a NULL pointer is passed to the
* following paramters, then an error will be returned. Default structures
* are available in the csl_prev_defaults.h for use here.
*/
/** Input format,
* CSL_CCDC_IN_RAW_DATA,
* CSL_CCDC_IN_YCbCr_16_BIT,
* CSL_CCDC_IN_YCbCr_8_BIT,
* CSL_CCDC_IN_REC656_BIT
*/
CSL_CcdcInputSelect input;
/** DC level to subtract from input data */
Uint16 dcsub;
/** Structure for the Sync Mode Configuration */
CSL_CcdcSyncModeConfig *syncModeConfig;
/** Structure for Black Compensation Configuration */
CSL_CcdcBlackCmpConfig *blackCompConfig;
/** Structure for Culling Control */
CSL_CcdcCullingControl *culling;
/** Structure for CCD color pattern */
CSL_CcdcColorPatternConfig *colorPatternConfig;
/** The following parameters are not required. If a NULL pointer is passed to the
* following paramters, then the data for these parameters will not be set. All modes
* will be disabled.
*/
/** Structure for the enabling or disabling internal modes/data paths */
CSL_CcdcMode *mode;
/** Structure for Black Clamp Conguration */
CSL_CcdcOptBlackClampConfig *clampConfig;
/** Structure for FPC configuration */
CSL_CcdcFPCConfig *fpcConfig;
/** Structure for Video port configuration */
CSL_CcdcVpConfig *vpConfig;
/** Structure for Data reformatter configuration */
CSL_CcdcFmtConfig *formatConfig;
/** Structure for Program entries for even lines */
CSL_CcdcFmtProgConfig *evenProgConfig;
/** Structure for Program entries for odd lines */
CSL_CcdcFmtProgConfig *oddProgConfig;
/** Structure for SDRAM/DDRAM line offset configuration */
CSL_CcdcSdramOffsetConfig *sdramOffsetConfig;
/** Structure for ALAW Sdram output Configuration */
CSL_CcdcALawConfig *alawConfig;
/** Structure for YCbCr configuration */
CSL_CcdcYccInputConfig *yccInputConfig;
/** Structure for REC656 parameter setup */
CSL_CcdcRec656Config *rec656Config;
}CSL_CcdcHwSetup;
/** @brief CCDC Peripheral ID, Class, and Revision structure
*
* This structure is used for querying the CCDC peripheral ID, class, and revision
*/
typedef struct CSL_CcdcRevStatus_{
/** CCDC Peripheral ID */
Uint16 peripheralID;
/** Class Identification */
Uint16 classID;
/** Revision Number*/
Uint16 revNum;
}CSL_CcdcRevStatus;
/**************************************************************************\
* CCDC global function declarations
\**************************************************************************/
/** This function is idempotent in that calling it many times is same as
* calling it once. This function initializes the CCDC CSL data structures.
*
* <b> Usage Constraints: </b>
* CSL system initialization must be successfully completed by invoking
* @a CSL_sysInit() before calling this function. This function should be
* called before using any of the CSL APIs
*
* @b Example:
* @verbatim
...
CSL_sysInit();
if (CSL_SOK != CSL_ccdcInit()) {
return;
}
@endverbatim
*
* @return returns the status of the operation
*
*/
CSL_Status CSL_ccdcInit(
void
);
/** The open call sets up the data structures for the particular instance of
* CCDC device. The device can be re-opened anytime after it has been normally
* closed if so required. CCDC Hardware setup will be performed at the end of
* the open call only if the HwSetup Pointer supplied was non- NULL. The handle
* returned by this call is input as an essential argument for rest of the APIs
* described for this module.
*
* <b> Usage Constraints: </b>
* The CSL system as well as CCDC must be successfully initialized
* via @a CSL_sysInit() and @a CSL_ccdcInit() before calling this
* function. Memory for the @a CSL_ccdcObj must be allocated outside
* this call. This object must be retained while usage of this peripheral.
*
* @b Example:
* @verbatim
CSL_CcdcObj ccdcObj;
CSL_CcdcHwSetup ccdcSetup;
CSL_Status status;
...
hCcdc = CSL_ccdcOpen(&ccdcObj,
CSL_CCDC_0,
CSL_EXCLUSIVE,
&ccdcSetup,
&status);
@endverbatim
*
* @return returns a handle @a CSL_CcdcHandle to the requested instance of
* CCDC if the call is successful, otherwise, a @a NULL is returned.
*
*/
CSL_CcdcHandle CSL_ccdcOpen (
/** Pointer to the object that holds reference to the
* instance of CCDC requested after the call
*/
CSL_CcdcObj *hCcdcObj,
/** Instance of CCDC to which a handle is requested
*/
CSL_CcdcNum ccdcNum,
/** Specifies if CCDC should be opened with exclusive or
* shared access to the associate pins
*/
CSL_OpenMode openMode,
/** This returns the status (success/errors) of the call
*/
CSL_Status *status
);
/** The Close call releases the resource and appropriate shared pins.
*
* <b> Usage Constraints: </b>
* Both @a CSL_ccdcInit() and @a CSL_ccdcOpen() must be called successfully
* in that order before @a CSL_ccdcClose() can be called.
*
* @b Example:
* @verbatim
CSL_CcdcHandle hCcdc;
...
CSL_ccdcClose(hCcdc);
@endverbatim
*
* @return returns the status of the operation (see @a CSL_Status)
*
*/
CSL_Status CSL_ccdcClose(
/** Pointer to the object that holds reference to the
* instance of CCDC requested after the call
*/
CSL_CcdcHandle hCcdc
);
/** This function initializes the device registers with the appropriate values
* provided through the HwSetup Data structure. This function needs to be called
* only if the HwSetup Structure was not previously passed through the Open call.
* After the Setup is completed, the serial device is ready for data transfer.
* For information passed through the HwSetup Data structure refer
* @a CSL_CcdcHwSetup.
*
* <b> Usage Constraints: </b>
* Both @a CSL_ccdcInit() and @a CSL_ccdcOpen() must be called
* successfully in that order before this function can be called. The user
* has to allocate space for & fill in the main setup structure appropriately
* before calling this function
*
* @b Example:
* @verbatim
CSL_CcdcHandle hCcdc;
CSL_CcdcHwSetup hwSetup = CSL_CCDC_HWSETUP_DEFAULTS;
CSL_ccdcHwSetup(hCcdc, &hwSetup);
@endverbatim
*
* @return Returns the status of the setup operation
*
*/
CSL_Status CSL_ccdcHwSetup(
/** Pointer to the object that holds reference to the
* instance of CCDC requested after the call
*/
CSL_CcdcHandle hCcdc,
/** Pointer to setup structure which contains the
* information to program CCDC to a useful state
*/
CSL_CcdcHwSetup *setup
);
/** Control operations for the CCDC. For a particular control operation, the
* pointer to the corresponding data type needs to be passed as argument HwControl
* function Call. All the arguments (Structure elements included) passed to the
* HwControl function are inputs. For the list of commands supported and argument
* type that can be @a void* casted & passed with a particular command refer to
* @a CSL_CcdcHwControlCmd.
*
* <b> Usage Constraints: </b>
* Both @a CSL_ccdcInit() and @a CSL_ccdcOpen() must be called successfully
* in that order before @a CSL_ccdcHwControl() can be called. For the
* argument type that can be @a void* casted & passed with a particular command
* refer to @a CSL_CcdcHwControlCmd
*
* @b Example:
* @verbatim
CSL_CcdcHandle hCcdc;
CSL_Status status;
...
status = CSL_ccdcHwControl(hCcdc,
CSL_CCDC_CMD_START,
&command);
@endverbatim
*
* @return returns the status of the operation (see @a CSL_Status)
*
*/
CSL_Status CSL_ccdcHwControl(
/** Pointer to the object that holds reference to the
* instance of CCDC requested after the call
*/
CSL_CcdcHandle hCcdc,
/** The command to this API indicates the action to be taken
*/
CSL_CcdcHwControlCmd cmd,
/** An optional argument @a void* casted
*/
void *arg
);
/** This function is used to read the current device configuration, status flags
* and the value present associated registers. Following table details the various
* status queries supported and the associated data structure to record the response.
* User should allocate memory for the said data type and pass its pointer as an
* unadorned void* argument to the status query call. For details about the various
* status queries supported and the associated data structure to record the response,
* refer to @a CSL_CcdcHwStatusQuery
*
* <b> Usage Constraints: </b>
* Both @a CSL_ccdcInit() and @a CSL_ccdcOpen() must be called successfully
* in that order before @a CSL_ccdcGetHwStatus() can be called. For the
* argument type that can be @a void* casted & passed with a particular command
* refer to @a CSL_CcdcHwStatusQuery
*
* @b Example:
* @verbatim
CSL_CcdcHandle hCcdc;
CSL_Status status;
Uint16 response;
...
status = CSL_ccdcGetHwStatus(hCcdc,
CSL_CCDC_QUERY_BUS_BUSY,
&response);
@endverbatim
*
* @return Returns the status of the operation (see @a CSL_Status)
*
*/
CSL_Status CSL_ccdcGetHwStatus(
/** Pointer to the object that holds reference to the
* instance of CCDC requested after the call
*/
CSL_CcdcHandle hCcdc,
/** The query to this API which indicates the status
* to be returned
*/
CSL_CcdcHwStatusQuery query,
/** Placeholder to return the status. @a void* casted */
void *response
);
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -