📄 lcddrv.c
字号:
* DESCRIPTION
*
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void LCDrDISPartialExit(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
LCDrCtrlWrite(LCDrPTLOUT);
}
/* ----------------------------------------------------------------------------
Function : void LCDrConfAREAScroll(uint8 topBlock, uint8 bottomBlock, uint8 noOfBlocks, uint8 areaMode)
Description: This function is called for scroll option.
Input : top block -> upper fixed area
bottom block -> lower fixed area
no of blocks -> number of blocks to be moved
areaMode -> mode of moving LCDrCENTERSCROLL, LCDrTOPSCROLL
LCDrBOTTOMSCROLL, LCDrALLSCROLL
Output : None
--------------------------------------------------------------------------------- */
/*****************************************************************************
* FUNCTION
* LCDrConfAREAScroll
* DESCRIPTION
*
* PARAMETERS
* topBlock [IN]
* bottomBlock [IN]
* noOfBlocks [IN]
* areaMode [IN]
* RETURNS
* void
*****************************************************************************/
void LCDrConfAREAScroll(uint8 topBlock, uint8 bottomBlock, uint8 noOfBlocks, uint8 areaMode)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
LCDrCtrlWrite(LCDrASCSET);
LCDrDataWrite(topBlock);
LCDrDataWrite(bottomBlock);
LCDrDataWrite(noOfBlocks);
LCDrDataWrite(areaMode);
}
/* ----------------------------------------------------------------------------
Function : void LCDrScrollStart(uint8 startBlock)
Description: This function is used to start scrolling.
Input : start block address
Output : None
------------------------------------------------------------------------------- */
/*****************************************************************************
* FUNCTION
* LCDrScrollStart
* DESCRIPTION
*
* PARAMETERS
* startBlock [IN]
* RETURNS
* void
*****************************************************************************/
void LCDrScrollStart(uint8 startBlock)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
LCDrCtrlWrite(LCDrSCSTART);
LCDrDataWrite(startBlock);
}
/* ----------------------------------------------------------------------------
Function : void LCDrSize(uint16 *outLCDWidth,uint16 *outLCDHeight)
Description: This function return LCD height and width.
Input : NULL
Output : None
------------------------------------------------------------------------------- */
/*****************************************************************************
* FUNCTION
* LCDrSize
* DESCRIPTION
*
* PARAMETERS
* outLCDWidth [?]
* outLCDHeight [?]
* RETURNS
* void
*****************************************************************************/
void LCDrSize(uint16 *outLCDWidth, uint16 *outLCDHeight)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
*outLCDWidth = LCDrWIDTH;
*outLCDHeight = LCDrHEIGHT;
}
/* ----------------------------------------------------------------------------
Function : void LCDrTest(void)
Description: This function test different modes of LCD.
Input : NULL
Output : None
------------------------------------------------------------------------------- */
/*****************************************************************************
* FUNCTION
* LCDrTest
* DESCRIPTION
*
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void LCDrTest(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
LCDrBlockWrite(0, 0, LCDrWIDTH - 1, LCDrHEIGHT - 1);
#if 0
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif /* 0 */
/* LCDrCTRLOSCOFF(); */
// LCDrDISPOFF();
// LCDrPOWERCNTL(0x00);
// LCDrGENSLPIN();
/*
* LCDrCtrlWrite(LCDrASCSET);
* LCDrDataWrite(10);
* LCDrDataWrite(10);
* LCDrDataWrite(20);
* LCDrDataWrite(01);
*
* LCDrCtrlWrite(LCDrSCSTART);
* LCDrDataWrite(10);
*/
/*
* LCDrDrawRectangle(0,5,LCDrWIDTH-1,25, 0x0F00);
*
* LCDrDrawRectangle(0,30,LCDrWIDTH-1,50, 0x00F0);
*
* LCDrDrawRectangle(0,55,LCDrWIDTH-1,75, 0x000F);
*
* LCDrDrawRectangle(0,80,LCDrWIDTH-1,100, 0x0FF0);
*
* LCDrDrawRectangle(0,105,LCDrWIDTH-1,125,0x00FF);
*
* LCDrDrawRectangle(0,130,LCDrWIDTH-1,150,0x0F0F);
*
* LCDrDrawRectangle(0,155,LCDrWIDTH-1,160,0x0FFF);
*
*
* L1_LCDrOFF();
* LCDrCtrlWrite(LCDrPWRCTR); // Power Control
* LCDrDataWrite(0x0000); // All Ckts ON
*
* LCDrCtrlWrite(LCDrPWRCTR); // Power Control
* LCDrDataWrite(0x0f); // All Ckts ON
*
* L1_LCDrON();
*/
}
/* amit not required */
/* ----------------------------------------------------------------------------
Function : LCDrDelay
Description: This function gives delay.
Input : NULL
Output : None
------------------------------------------------------------------------------- */
/*****************************************************************************
* FUNCTION
* LCDrDelay
* DESCRIPTION
*
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void LCDrDelay(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
uint16 delay;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
for (delay = 0; delay < 300; delay++)
{
}
}
/* ----------------------------------------------------------------------------
Function : LCDrTestColours
Description: This function test colours on LCD.
Input : NULL
Output : None
------------------------------------------------------------------------------- */
/*****************************************************************************
* FUNCTION
* LCDrTestColours
* DESCRIPTION
*
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
void LCDrTestColours(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
LCDrDrawRectangle(0, 5, LCDrWIDTH - 1, 25, 0x0F00);
LCDrDrawRectangle(0, 30, LCDrWIDTH - 1, 50, 0x00F0);
LCDrDrawRectangle(0, 55, LCDrWIDTH - 1, 75, 0x000F);
LCDrDrawRectangle(0, 80, LCDrWIDTH - 1, 100, 0x0FF0);
LCDrDrawRectangle(0, 105, LCDrWIDTH - 1, 125, 0x00FF);
LCDrDrawRectangle(0, 130, LCDrWIDTH - 1, 150, 0x0F0F);
LCDrDrawRectangle(0, 155, LCDrWIDTH - 1, 160, 0x0FFF);
}
/* ----------------------------------------------------------------------------
Function : LCDrTestWritep
Description: This function is for testing.
Input : x1, x2, y1, y2
Output : None
------------------------------------------------------------------------------- */
/*****************************************************************************
* FUNCTION
* LCDrTestWritep
* DESCRIPTION
*
* PARAMETERS
* x1 [IN]
* y1 [IN]
* x2 [IN]
* y2 [IN]
* shadow_bufferTest [IN]
* RETURNS
* void
*****************************************************************************/
void LCDrTestWritep(uint16 x1, uint16 y1, uint16 x2, uint16 y2, uint16 shadow_bufferTest)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
uint16 LCDrx;
uint16 LCDry;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
LCDrSetPageAddr((uint8) y1, (uint8) y2); /* Page Address */
LCDrSetColAddr((uint8) x1, (uint8) x2); /* Column Address */
LCDrWrStart(); /* Write Command */
for (LCDry = y1; LCDry <= y2; LCDry++) /* Filling the LCD RAM */
for (LCDrx = x1; LCDrx <= x2; LCDrx++)
{
LCDrRAMWrite(gShadowBuffer[LCDry][LCDrx]);
}
}
#endif /* MMI_ON_WIN32 */
/* -----------------------------------------------------------------------------------------------------------------
End Of File LcdDrv.c
-------------------------------------------------------------------------------------------------------------------- */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -