初级会员
- 积分
- 60
- 金钱
- 60
- 注册时间
- 2014-1-7
- 在线时间
- 1 小时
|
参照这里就可以了 http://www.openedv.com/posts/list/0/27697.htm
需要修改的部分在这里:
/********************************************************************
*
* LcdWriteReg
*
* Function description:
* Sets display register
*/
static void LcdWriteReg(U16 Data) {
// ... TBD by user
LCD_RS_CLR;//?????·
LCD_CS_CLR;
DATAOUT(Data);
LCD_WR_CLR;
LCD_WR_SET;
LCD_CS_SET;
}
/********************************************************************
*
* LcdWriteData
*
* Function description:
* Writes a value to a display register
*/
static void LcdWriteData(U16 Data) {
// ... TBD by user
LCD_WR_DATA(Data);
}
/********************************************************************
*
* LcdWriteDataMultiple
*
* Function description:
* Writes multiple values to a display register.
*/
static void LcdWriteDataMultiple(U16 * pData, int NumItems) {
while (NumItems--) {
// ... TBD by user
LCD_WR_DATA(*pData++)
}
}
/********************************************************************
*
* LcdReadDataMultiple
*
* Function description:
* Reads multiple values from a display register.
*/
static void LcdReadDataMultiple(U16 * pData, int NumItems) {
*pData = LCD_RD_DATA();
while (NumItems--) {
// ... TBD by user
*pData++=LCD_RD_DATA();
}
}
提醒一下,有两个地方要注意
(1)在GUI_Init()之前加上这一句,RCC_AHBPeriphClockCmd(RCC_AHBPeriph_CRC, ENABLE);
(2)LCD_X_Config()中GUIDRV_FlexColor_SetFunc(pDevice, &ortAPI, GUIDRV_FLEXCOLOR_F66709, GUIDRV_FLEXCOLOR_M16C0B16);这里是GUIDRV_FLEXCOLOR_F66709,注意不是GUIDRV_FLEXCOLOR_F66708
|
|