csl_lcdconv.h
来自「dsp在音频处理中的运用」· C头文件 代码 · 共 606 行 · 第 1/2 页
H
606 行
/** ============================================================================
* @file csl_lcdconv.h
*
* @path $(CSLPATH)\arm\lcdconv\src
*
* @desc API header file for LCD data conversion module CSL
*
*/
/* ============================================================================
* Copyright (c) Texas Instruments Inc 2002, 2003, 2004
*
* Use of this software is controlled by the terms and conditions found in the
* license agreement under which this software has been supplied.
* ===========================================================================
*/
/* @(#) PSP/CSL 3.00.01.00[5912] (2004-05-27) */
/* =============================================================================
* Revision History
* ===============
* 06-Jul-2004 sd File created.
* 06-Jul-2004 sd Changes for new CSL architecture.
* 13-Jul-2004 sd Changes to support RGB LUT configuration.
* 04-Aug-2004 sd Code review changes.
* =============================================================================
*/
#ifndef _CSL_LCDCONV_H_
#define _CSL_LCDCONV_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <csl.h>
#include <cslr_lcdconv.h>
/**
* LCD convertor global typedef declarations
*/
/**
* The enum describes the modes of the LCD data conversion module. The LCD data conversion
* module can be programmed in 16 bit mode or 18 bit mode.
*/
typedef enum {
/**
* In 16 bit mode, the 16-bit LCD pixel signal from the LCD controller
* goes directly to the external LCD display.
*/
CSL_LCDCONV_MODE_16BIT = 0,
/**
* In 18-bit LCD mode, the 16-bit LCD pixel signal is converted to an
* 18-bit LCD pixel signal through an RGB look-up table.
*/
CSL_LCDCONV_MODE_18BIT = 1
} CSL_LcdconvMode;
/** The enum describes the LCD data conversion module write clock status. */
typedef enum {
/** When the bit is off, the RGB look-up table clock is turned off. */
CSL_LCDCONV_CLKEN_DISABLE = 0,
/** When the bit is on, the OCP bus clock clocks the RGB look-up table. */
CSL_LCDCONV_CLKEN_ENABLE = 1
} CSL_LcdconvClk;
/**
* The enum describes the active edge of the LCD data conversion module
* frame sync signal.
*/
typedef enum {
/** The active edge of the LCD convertor frame sync signal is positive. */
CSL_LCDCONV_FSYNCSENSE_POSITIVE = 0,
/** The active edge of the LCD convertor frame sync signal is negative. */
CSL_LCDCONV_FSYNCSENSE_NEGATIVE = 1
} CSL_LcdconvFSyncSense;
/** This structure describes the red and blue look up tables. */
typedef struct CSL_LcdconvRBLookUpTbl {
/** Red / Blue look up table array */
Uint8 lcdconvRBLookUpTbl [32];
} CSL_LcdconvRBLookUpTbl;
/** This structure describes the green look up table. */
typedef struct CSL_LcdconvGLookUpTbl {
/** Green look up table array */
Uint8 lcdconvGLookUpTbl [64];
} CSL_LcdconvGLookUpTbl;
/**
* This structure describes the RGB look up table entry.
*/
typedef struct CSL_LcdconvLookUpTblEntry {
/** RGB look up table index */
Uint8 lcdconvLookUpTblIndex;
/** RGB look up table value */
Uint8 lcdconvLookUpTblVal;
} CSL_LcdconvLookUpTblEntry;
/**
* This enum describes the commands used to control the LCD data conversion
* module through CSL_lcdconvHwControl ()
*/
typedef enum {
/**
* @brief Sets the mode of the LCD data conversion module.
* @param CSL_LcdconvMode
*/
CSL_LCDCONV_CMD_MODE = 0,
/**
* @brief Sets the active edge of the LCD frame sync signal.
* @param CSL_LcdconvFSyncSense
*/
CSL_LCDCONV_CMD_FSYNCSENSE = 1,
/**
* @brief Enables the write clock to LCD RGB look-up table RAM.
* @param None
*/
CSL_LCDCONV_CMD_CLKENABLE = 2,
/**
* @brief Disables the write clock to LCD RGB look-up table RAM.
* @param None
*/
CSL_LCDCONV_CMD_CLKDISABLE = 3,
/**
* @brief Configures the LCD R look-up table RAM.
* @param CSL_LcdconvRBLookUpTbl
*/
CSL_LCDCONV_CMD_SET_R_LOOKUP_TABLE = 4,
/**
* @brief Configures the LCD R look-up table value at a particular index.
* @param CSL_LcdconvLookUpTblEntry
*/
CSL_LCDCONV_CMD_SET_R_LUT_BY_INDEX = 5,
/**
* @brief Configures the LCD B look-up table RAM.
* @param CSL_LcdconvRBLookUpTbl
*/
CSL_LCDCONV_CMD_SET_B_LOOKUP_TABLE = 6,
/**
* @brief Configures the LCD B look-up table value at a particular index.
* @param CSL_LcdconvLookUpTblEntry
*/
CSL_LCDCONV_CMD_SET_B_LUT_BY_INDEX = 7,
/**
* @brief Configures the LCD G look-up table RAM.
* @param CSL_LcdconvGLookUpTbl
*/
CSL_LCDCONV_CMD_SET_G_LOOKUP_TABLE = 8,
/**
* @brief Configures the LCD G look-up table value at a particular index.
* @param CSL_LcdconvLookUpTblEntry
*/
CSL_LCDCONV_CMD_SET_G_LUT_BY_INDEX = 9
} CSL_LcdconvHwControlCmd;
/**
* This enum describes the commands used to get status of various parameters of the
* LCD data conversion module. These values are used in CSL_lcdconvGetHwStatus ()
*/
typedef enum {
/**
* @brief Gets the current mode of the LCD data conversion module
* @param CSL_LcdconvMode
*/
CSL_LCDCONV_QUERY_MODE = 0,
/**
* @brief Gets the current setting for the active edge of the frame sync signal
* of the LCD data conversion module
* @param CSL_LcdconvFSyncSense
*/
CSL_LCDCONV_QUERY_FSYNCSENSE = 1,
/**
* @brief Gets the current status of the write clock to the LCD RGB look-up
* table RAM
* @param CSL_LcdconvClk
*/
CSL_LCDCONV_QUERY_WRITECLK = 2
} CSL_LcdconvHwStatusQuery;
/** Hardware setup structure for LCD Data Conversion Module.*/
typedef struct CSL_LcdconvHwSetup {
/** LCD data conversion module mode 16 bit / 18 bit */
CSL_LcdconvMode mode;
/** Configuration of the write clock to LCD RGB look-up table RAM */
CSL_LcdconvClk writeclk;
/** Configuration of the active edge of the LCD frame sync signal */
CSL_LcdconvFSyncSense activeedge;
} CSL_LcdconvHwSetup;
/**
* Config-structure used to configure the LCD data conversion module
* using CSL_lcdconvHwSetupRaw()
*/
typedef struct CSL_LcdconvConfig {
/** LCD data conversion module control register */
Uint8 CTRL;
} CSL_LcdconvConfig;
/**
* Module specific context information. Present implementation of LCD data
* conversion module CSL doesn't have any context information.
*/
typedef struct {
/**
* Context information of LCD data conversion module CSL.
* The below declaration is just a place-holder for future implementation.
*/
Uint16 contextInfo;
} CSL_LcdconvContext;
/**
* Module specific parameters. Present implementation of LCD data conversion
* module CSL doesn't have any module specific parameters.
*/
typedef struct {
/**
* Bit mask to be used for module specific parameters. The below
* declaration is just a place-holder for future implementation.
*/
CSL_BitMask16 flags;
} CSL_LcdconvParam;
/**
* This structure contains the base-address information for the peripheral
* instance.
*/
typedef struct {
/** Base-address of the configuration registers of the peripheral */
CSL_LcdconvRegsOvly regs;
} CSL_LcdconvBaseAddress;
/** LCD data conversion module object structure */
typedef struct CSL_LcdconvObj {
/** Pointer to the register overlay structure of LCD data conversion module */
CSL_LcdconvRegsOvly regs;
/** Instance of LCD data conversion module being referred by this object */
CSL_InstNum perNum;
} CSL_LcdconvObj;
/**
* This data type is used to return the handle to the CSL of the LCD
* data conversion module
*/
typedef struct CSL_LcdconvObj *CSL_LcdconvHandle;
/** Default values for config structure */
#define CSL_LCDCONV_CONFIG_DEFAULTS { \
CSL_LCDCONV_CTRL_RESETVAL \
}
/** Default hardware setup parameters */
#define CSL_LCDCONV_HWSETUP_DEFAULTS { \
CSL_LCDCONV_MODE_16BIT, \
CSL_LCDCONV_CLKEN_ENABLE, \
CSL_LCDCONV_FSYNCSENSE_POSITIVE \
}
/**************************************************************************\
* LCDCONV global function declarations
\**************************************************************************/
/*
* =============================================================================
* @func CSL_lcdconvInit
*
* @desc
* @n This is the initialization function for the LCD data conversion module
* CSL. This function should be called before any LCD data conversion
* module CSL functions are called. This function is idem-potent.
*
* @arg pContext
* Context information of LCD data conversion module CSL
*
* @ret CSL_Status
* CSL_SOK - Always returns
*
* @eg
* CSL_lcdconvInit(NULL)
* =============================================================================
*/
extern CSL_Status CSL_lcdconvInit (
CSL_LcdconvContext* pContext
);
/*
* =============================================================================
* @func CSL_lcdconvOpen
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?