![]() |
![]() |
| static void CSL_lcdcDisableLiddDMA | ( | CSL_LcdcHandle | hLcdc | ) | [inline, static] |
===========================================================================
CSL_lcdcDisableLiddDMA
Description
This function disables the DMA Transfer for LIDD Controller.
Arguments
hLcdc Handle to LCDC instance
Return Value None
Pre Condition
LCD_open() API should be called before this.
Post Condition
None
Modifies
None
Example
CSL_LcdcHandle hLcdc;
CSL_lcdcDisableLiddDMA (hLcdc);
===========================================================================
| hLcdc | Pointer to the object that holds reference to the instance of LCDC requested after the call |
References CSL_LcdcObj::regs.
| static void CSL_lcdcEnableLiddDMA | ( | CSL_LcdcHandle | hLcdc | ) | [inline, static] |
===========================================================================
CSL_lcdcEnableLiddDMA
Description
This function enables the DMA Transfer for LIDD Controller.
Arguments
hLcdc Handle to LCDC instance
Return Value None
Pre Condition
1: LCD_open() API should be called before this.
2: LCD_setup() should be called for making use of LIDD controller.
4: LCD_configDMA() should be called to make sure the DMA setup.
Post Condition
None
Modifies
None
Example
CSL_LcdcHandle hLcdc;
CSL_lcdcEnableLiddDMA (hLcdc);
===========================================================================
| hLcdc | Pointer to the object that holds reference to the instance of LCDC requested after the call |
References CSL_LcdcObj::regs.
| static Uint16 CSL_lcdcGetLiddCsAddr | ( | CSL_LcdcHandle | hLcdc, |
| CSL_LcdcChipSelect | cs0cs1 | ||
| ) | [inline, static] |
===========================================================================
CSL_lcdcGetLiddCsAddr
Description
This function gets the of LIDD CS0or1 Address Register value.
Arguments
hLcdc Handle to LCDC instance
cs0cs1 chip select 0 or 1
Return Value Uint16
Pre Condition
LCD_open() API should be called before this.
Post Condition
None
Modifies
None
Example
Uint16 status;
status = CSL_lcdcGetLiddCsAddr (hLcdc, cs0cs1, &response);
===========================================================================
| hLcdc | Pointer to the object that holds reference to the instance of LCDC requested after the call |
References CSL_LCDC_LIDD_CS0, and CSL_LcdcObj::regs.
| static Uint16 CSL_lcdcGetLiddCsData | ( | CSL_LcdcHandle | hLcdc, |
| CSL_LcdcChipSelect | cs0cs1 | ||
| ) | [inline, static] |
===========================================================================
CSL_lcdcGetLiddCsData
Description
This function gets the of LIDD CS0or1 DATA Register value.
Arguments
hLcdc Handle to LCDC instance
cs0cs1 chip select 0 or 1
Return Value Uint16
Pre Condition
LCD_open() API should be called before this.
Post Condition
None
Modifies
None
Example
Uint16 status;
status = CSL_lcdcGetLiddCsData (hLcdc, cs0cs1);
===========================================================================
| hLcdc | Pointer to the object that holds reference to the instance of LCDC requested after the call |
References CSL_LCDC_LIDD_CS0, and CSL_LcdcObj::regs.
| static void CSL_lcdcGetVersion | ( | CSL_LcdcHandle | hLcdc, |
| void * | responseMinor, | ||
| void * | responseMajor | ||
| ) | [inline, static] |
===========================================================================
CSL_lcdcGetVersion
Description
This function gets the Version of the LCDC module.
Arguments
hLcdc Handle to LCDC instance
responseMinor Placeholder to return status of minor revision.
responseMajor Placeholder to return status of major revision.
Return Value None
Pre Condition
LCD_open() API should be called before this.
Post Condition
None
Modifies
None
Example
CSL_lcdcGetVersion (hLcdc, &responseMinor, &responseMajor);
===========================================================================
| hLcdc | Pointer to the object that holds reference to the instance of LCDC requested after the call |
| responseMinor | Placeholder to return the status. void* casted |
| static void CSL_lcdcLiddWriteCsAddr | ( | CSL_LcdcHandle | hLcdc, |
| CSL_LcdcChipSelect | cs0cs1, | ||
| Uint32 | arg | ||
| ) | [inline, static] |
===========================================================================
CSL_lcdcLiddWriteCsAddr
Description
This function sets the LIDD CS 0 or 1 Address Read/Write Register.
Arguments
hLcdc Handle to LCDC instance
cs0cs1 chip select 0 or 1
arg variable to hold the value
Return Value None
Pre Condition
LCD_open() API should be called before this.
Post Condition
None
Modifies
None
Example
CSL_lcdcLiddWriteCsAddr (hLcdc, cs0cs1, arg);
===========================================================================
| hLcdc | Pointer to the object that holds reference to the instance of LCDC requested after the call |
References CSL_LCDC_LIDD_CS0, and CSL_LcdcObj::regs.
| static void CSL_lcdcLiddWriteCsData | ( | CSL_LcdcHandle | hLcdc, |
| CSL_LcdcChipSelect | cs0cs1, | ||
| Uint16 | arg | ||
| ) | [inline, static] |
===========================================================================
CSL_lcdcLiddWriteCsData
Description
This function sets the LIDD CS 0 or 1 Data Read/Write Register.
Arguments
hLcdc Handle to LCDC instance
cs0cs1 chip select 0 or 1
arg variable to hold the value
Return Value None
Pre Condition
LCD_open() API should be called before this.
Post Condition
None
Modifies
None
Example
CSL_lcdcLiddWriteCsData (hLcdc, cs0cs1, arg);
===========================================================================
| hLcdc | Pointer to the object that holds reference to the instance of LCDC requested after the call |
References CSL_LCDC_LIDD_CS0, and CSL_LcdcObj::regs.
| CSL_Status LCD_close | ( | CSL_LcdcHandle | hLcdc | ) |
===========================================================================
LCD_close
Description
This function closes the specified handle to LCDC.
Arguments
hLcdc Handle to the LCDC
Return Value CSL_Status
Pre Condition
LCD_open() API should be called before this.
Post Condition
No other API of LCDC should be call after this.
Modifies
LCDC Register Overlay structure will be assigned to NULL.
Example
Uint16 instanceNum;
CSL_status status;
CSL_LcdcObj pLcdcObj
CSL_LcdcHandle hLcdc;
...
instanceNum = CSL_LCDC_INSTANCE_0
hLcdc = LCD_open(instanceNum, &pLcdcObj, &status);
status = LCD_close(hLcdc);
===========================================================================
References CSL_LCDC_INSTANCE_INV, CSL_LcdcObj::perNum, and CSL_LcdcObj::regs.
| CSL_Status LCD_configDMA | ( | CSL_LcdcHandle | hLcdc, |
| CSL_LcdcConfigDma * | pconfigDma | ||
| ) |
===========================================================================
LCD_configDMA
Description
It configures the LCDC register specific to DMA configuration and used to put the bulky data on LCD panel.
Arguments
hLcdc Handle to the LCDC.
pconfigDma Pointer to DMA Config structure.
Return Value CSL_Status
Pre Condition
LCD_open() and LCD_setup() API should be called before this and memory buffer must be in the SARAM section.
Post Condition
For star of data Trnsfer enable the dma bit in LIDD register
Modifies
LCDC DMA Related Registers will be populated.
Example
#define LCD_MAX_BUFFER_SIZE (0x0FFF)
Uint16 instanceNum;
CSL_status status;
CSL_LcdcObj pLcdcObj
CSL_LcdcHandle hLcdc;
CSL_LcdcHwSetup setup;
CSL_LcdcConfigDma pConfigDma;
Uint16 Buf[LCD_MAX_BUFFER_SIZE];
...
CSL_LcdcConfigLidd configLIDD;
CSL_LcdcLiddTiming timingCs0LIDD;
CSL_LcdcLiddTiming timingCs1LIDD;
*
.........\\\\\\\\\\\\\ SETUP for LIDD Controller
configLIDD.clkDiv = 0x3;
configLIDD.fdoneIntEn = CSL_LCDC_LIDD_FDONE_DISABLE ;
configLIDD.dmaCs0Cs1 = CSL_LCDC_LIDD_CS0;
configLIDD.dmaEnable = CSL_LCDC_LIDD_DMA_DISABLE;
configLIDD.polControl = 0x0000;
configLIDD.modeSel = CSL_LCDC_LIDD_ASYNC_MPU80;
timingCs0LIDD.wSu = 0x1F;
timingCs0LIDD.wStrobe = 0x3F ;
timingCs0LIDD.wHold = 0x0F;
timingCs0LIDD.rSu = 0x1F;
timingCs0LIDD.rStrobe = 0x3F;
timingCs0LIDD.rHold = 0x0F;
timingCs0LIDD.ta = 0x01;
timingCs1LIDD.wSu = 0x1F;
timingCs1LIDD.wStrobe = 0x3F ;
timingCs1LIDD.wHold = 0x0F;
timingCs1LIDD.rSu = 0x1F;
timingCs1LIDD.rStrobe = 0x3F;
timingCs1LIDD.rHold = 0x0F;
timingCs1LIDD.ta = 0x01;
setup.config = configLIDD;
setup.useCs1 = CSL_LCDC_LIDD_NOT_USE_CS1;
setup.timingCs0 = timingCs0LIDD;
setup.extendSetup = NULL;
||||||||||||*******************************************************||||||||||||
instanceNum = CSL_LCDC_INSTANCE_0
hLcdc = LCD_open(instanceNum, &pLcdcObj, &status);
status = LCD_setup(hLcdc, &setup);
pConfigDma.burstSize = CSL_LCDC_DMA_BURST4;
pConfigDma.eofIntEn = CSL_LCDC_EOFINT_DISABLE;
pConfigDma.bigEndian = CSL_LCDC_ENDIANESS_LITTLE;
pConfigDma.frameMode = CSL_LCDC_FBMODE_SINGLE;
pConfigDma.fb0Base = (Uint32)Buf;
pConfigDma.fb0Ceil = (Uint32)&Buf[LCD_MAX_BUFFER_SIZE];
pConfigDma.fb1Base = (Uint32)NULL;
pConfigDma.fb1Ceil = (Uint32)NULL;
status = LCD_configDMA(hLcdc, &pconfigDma);
...
===========================================================================
===========================================================================
LCD_configDMA
Description
It configures the LCDC register specific to DMA configuration and used to put the bulky data on LCD panel.
Arguments
hLcdc Handle to the LCDC.
pconfigDma Pointer to DMA Config structure.
Return Value CSL_Status
Pre Condition
LCD_open() and LCD_setup() API should be called before this and memory buffer must be in the SARAM section.
Post Condition
For star of data Transfer enable the dma bit in LIDD register
Modifies
LCDC DMA Related Registers will be populated.
Example
#define LCD_MAX_BUFFER_SIZE (0x0FFF)
Uint16 instanceNum;
CSL_status status;
CSL_LcdcObj pLcdcObj
CSL_LcdcHandle hLcdc;
CSL_LcdcHwSetup setup;
CSL_LcdcConfigDma pConfigDma;
Uint16 Buf[LCD_MAX_BUFFER_SIZE];
...
CSL_LcdcConfigLidd configLIDD;
CSL_LcdcLiddTiming timingCs0LIDD;
CSL_LcdcLiddTiming timingCs1LIDD;
*
.........\\\\\\\\\\\\\ SETUP for LIDD Controller
configLIDD.clkDiv = 0x3;
configLIDD.fdoneIntEn = CSL_LCDC_LIDD_FDONE_DISABLE ;
configLIDD.dmaCs0Cs1 = CSL_LCDC_LIDD_CS0;
configLIDD.dmaEnable = CSL_LCDC_LIDD_DMA_DISABLE;
configLIDD.polControl = 0x0000;
configLIDD.modeSel = CSL_LCDC_LIDD_ASYNC_MPU80;
timingCs0LIDD.wSu = 0x1F;
timingCs0LIDD.wStrobe = 0x3F ;
timingCs0LIDD.wHold = 0x0F;
timingCs0LIDD.rSu = 0x1F;
timingCs0LIDD.rStrobe = 0x3F;
timingCs0LIDD.rHold = 0x0F;
timingCs0LIDD.ta = 0x01;
timingCs1LIDD.wSu = 0x1F;
timingCs1LIDD.wStrobe = 0x3F ;
timingCs1LIDD.wHold = 0x0F;
timingCs1LIDD.rSu = 0x1F;
timingCs1LIDD.rStrobe = 0x3F;
timingCs1LIDD.rHold = 0x0F;
timingCs1LIDD.ta = 0x01;
setup.config = configLIDD;
setup.useCs1 = CSL_LCDC_LIDD_NOT_USE_CS1;
setup.timingCs0 = timingCs0LIDD;
setup.extendSetup = NULL;
||||||||||||*******************************************************||||||||||||
instanceNum = CSL_LCDC_INSTANCE_0
hLcdc = LCD_open(instanceNum, &pLcdcObj, &status);
status = LCD_setup(hLcdc, &setup);
pConfigDma.burstSize = CSL_LCDC_DMA_BURST4;
pConfigDma.eofIntEn = CSL_LCDC_EOFINT_DISABLE;
pConfigDma.bigEndian = CSL_LCDC_ENDIANESS_LITTLE;
pConfigDma.frameMode = CSL_LCDC_FBMODE_SINGLE;
pConfigDma.fb0Base = (Uint32)Buf;
pConfigDma.fb0Ceil = (Uint32)&Buf[LCD_MAX_BUFFER_SIZE];
pConfigDma.fb1Base = (Uint32)NULL;
pConfigDma.fb1Ceil = (Uint32)NULL;
status = LCD_configDMA(hLcdc, &pconfigDma);
...
===========================================================================
References CSL_LcdcConfigDma::bigEndian, CSL_LcdcConfigDma::burstSize, CSL_LCD_DMA_SHIFT, CSL_LCD_SARAM_DMA_ADDR_OFFSET, CSL_LCD_SARAM_END_ADDR, CSL_LCD_SARAM_START_ADDR, CSL_LCD_UINT16_MASK, CSL_LCD_UINT16_NUMBER_BITS, CSL_LCDC_FBMODE_SINGLE, CSL_LcdcConfigDma::eofIntEn, CSL_LcdcConfigDma::fb0Base, CSL_LcdcConfigDma::fb0Ceil, CSL_LcdcConfigDma::fb1Base, CSL_LcdcConfigDma::fb1Ceil, CSL_LcdcConfigDma::frameMode, and CSL_LcdcObj::regs.
| static CSL_Status LCD_getConfigDMA | ( | CSL_LcdcHandle | hLcdc, |
| CSL_LcdcConfigDma * | pgetConfigDma | ||
| ) | [inline, static] |
===========================================================================
LCD_getConfigDMA
Description
It get configured value from LCD registers of DMA Purpose.
Arguments
hLcdc Handle to the LCDC.
pgetConfigDma Pointer to DMA Config structure.
Return Value CSL_Status
Pre Condition
LCD_open() API should be called before this.
Post Condition
None
Modifies
None
Example
CSL_LcdcHandle hLcdc;
CSL_LcdcConfigDma pgetConfigDma;
CSL_status status;
NOTE: for setup parameter refer the function prologue of LCD_configDMA() function.
status = LCD_getConfigDMA(hLcdc, &pgetConfigDma);
...
===========================================================================
References CSL_LcdcConfigDma::bigEndian, CSL_LcdcConfigDma::burstSize, CSL_LCD_DMA_SHIFT, CSL_LCD_SARAM_DMA_ADDR_OFFSET, CSL_LCD_UINT16_NUMBER_BITS, CSL_LcdcConfigDma::eofIntEn, CSL_LcdcConfigDma::fb0Base, CSL_LcdcConfigDma::fb0Ceil, CSL_LcdcConfigDma::fb1Base, CSL_LcdcConfigDma::fb1Ceil, CSL_LcdcConfigDma::frameMode, and CSL_LcdcObj::regs.
| static CSL_Status LCD_getSetup | ( | CSL_LcdcHandle | hLcdc, |
| CSL_LcdcHwSetup * | getSetup | ||
| ) | [inline, static] |
===========================================================================
LCD_getSetup
Description
It gets the configuration details from the LCDC Registers.
Arguments
hLcdc Handle to the LCDC.
getSetup Pointer to DMA setup structure.
Return Value CSL_Status
Pre Condition
None
Post Condition
LCD_open() API should be called before this.
Modifies
None
Example
CSL_LcdcHandle hLcdc;
CSL_LcdcHwSetup getSetup;
CSL_status status;
NOTE: for setup parameter refer the function prologue of LCD_setup() function.
status = LCD_getSetup(hLcdc, &getSetup);
...
===========================================================================
References CSL_LcdcHwSetup::config, CSL_LCD_LCDLIDDCR_POLARITY_CONTROL_MASK, CSL_LCDC_LIDD_NOT_USE_CS1, CSL_LcdcObj::regs, CSL_LcdcHwSetup::timingCs0, CSL_LcdcHwSetup::timingCs1, and CSL_LcdcHwSetup::useCs1.
| CSL_Status LCD_init | ( | void | ) |
===========================================================================
LCD_init
Description
This is the initialization function for the LCD CSL. The function must be called before calling any other API from this CSL. This function is for enabling the clock to the LCD Controller. Currently, the function just return status CSL_SOK. as of now no checking is done inside the definition of function , but in near future it can be implemented.
Arguments
Return Value CSL_Status
Pre Condition
This must be first API to use LCDC module.
Post Condition
None
Modifies
None
Example
CSL_status status;
status = LCD_init();
===========================================================================
References CSL_LCD_RESET_CLOCK_CYCLE.
| CSL_LcdcHandle LCD_open | ( | Uint16 | instanceNum, |
| CSL_LcdcObj * | pLcdcObj, | ||
| CSL_Status * | status | ||
| ) |
===========================================================================
LCD_open
Description
This function returns the handle to the LCDC. and handle is passed to all other CSL APIs.
Arguments
instanceNum instance number for LCDC
pLcdcObj pointer to LCDC object.
status Status of the function call
Return Value CSL_LcdcHandle
Valid LCDC handle will be returned if status value is equal to CSL_SOK.
Pre Condition
LCD_init() API should be called before LCD_open().
Post Condition
1. The status is returned in the status variable. If status returned is
Modifies
1. The status variable
2. CSL_LcdcObj object structure
Example
Uint16 instanceNum;
CSL_status status;
CSL_LcdcObj pLcdcObj
CSL_LcdcHandle hLcdc;
...
instanceNum = CSL_LCDC_INSTANCE_0
hLcdc = LCD_open(instanceNum, &pLcdcObj, &status);
...
===========================================================================
References CSL_LcdcObj::perNum, and CSL_LcdcObj::regs.
| CSL_Status LCD_setup | ( | CSL_LcdcHandle | hLcdc, |
| CSL_LcdcHwSetup * | setup | ||
| ) |
===========================================================================
LCD_setup
Description
It configures the LCDC register specific to LIDD controller to draw the images or text on LCD panel.
Arguments
hLcdc Handle to the LCDC.
setup Pointer to LCDC setup structure.
Return Value CSL_Status
Pre Condition
LCD_open() API should be called before this.
Post Condition
None
Modifies
LCDC Registers will be populated.
Example
Uint16 instanceNum;
CSL_status status;
CSL_LcdcObj pLcdcObj
CSL_LcdcHandle hLcdc;
CSL_LcdcHwSetup setup;
...
CSL_LcdcConfigLidd configLIDD;
CSL_LcdcLiddTiming timingCs0LIDD;
CSL_LcdcLiddTiming timingCs1LIDD;
.........\\\\\\\\\\\\\ SETUP for LIDD Controller
configLIDD.clkDiv = 0x3;
configLIDD.fdoneIntEn = CSL_LCDC_LIDD_FDONE_DISABLE ;
configLIDD.dmaCs0Cs1 = CSL_LCDC_LIDD_CS0;
configLIDD.dmaEnable = CSL_LCDC_LIDD_DMA_DISABLE;
configLIDD.polControl = 0x0000;
configLIDD.modeSel = CSL_LCDC_LIDD_ASYNC_MPU80;
timingCs0LIDD.wSu = 0x1F;
timingCs0LIDD.wStrobe = 0x3F ;
timingCs0LIDD.wHold = 0x0F;
timingCs0LIDD.rSu = 0x1F;
timingCs0LIDD.rStrobe = 0x3F;
timingCs0LIDD.rHold = 0x0F;
timingCs0LIDD.ta = 0x01;
timingCs1LIDD.wSu = 0x1F;
timingCs1LIDD.wStrobe = 0x3F ;
timingCs1LIDD.wHold = 0x0F;
timingCs1LIDD.rSu = 0x1F;
timingCs1LIDD.rStrobe = 0x3F;
timingCs1LIDD.rHold = 0x0F;
timingCs1LIDD.ta = 0x01;
setup.config = configLIDD;
setup.useCs1 = CSL_LCDC_LIDD_NOT_USE_CS1;
setup.timingCs0 = timingCs0LIDD;
setup.extendSetup = NULL;
||||||||||||*******************************************************||||||||||||
instanceNum = CSL_LCDC_INSTANCE_0
hLcdc = LCD_open(instanceNum, &pLcdcObj, &status);
status = LCD_setup(hLcdc, &setup);
...
===========================================================================
References CSL_LcdcHwSetup::config, CSL_LCD_ENABLE, CSL_LCDC_LIDD_NOT_USE_CS1, CSL_LcdcObj::regs, CSL_LcdcHwSetup::timingCs0, CSL_LcdcHwSetup::timingCs1, and CSL_LcdcHwSetup::useCs1.
1.7.4