這個章節主要講解N9H30_LCD初始化部分:
1、RGB管腳初始化
// Configure multi-function pin for LCD interface
// GPG6 (CLK), GPG7 (HSYNC)
outpw(REG_SYS_GPG_MFPL, (inpw(REG_SYS_GPG_MFPL) & ~0xFF000000) | 0x22000000);
// GPG8 (VSYNC), GPG9 (DEN)
outpw(REG_SYS_GPG_MFPH, (inpw(REG_SYS_GPG_MFPH) & ~0xFF) | 0x22);
//DATA pin (16bit)
//GPA0 ~ GPA7 (DATA0~7)
outpw(REG_SYS_GPA_MFPL, 0x22222222);
//GPA8 ~ GPA15 (DATA8~15)
outpw(REG_SYS_GPA_MFPH, 0x22222222);
2、時鐘初始化
// LCD clock is selected from UPLL and divide to 20MHz
outpw(REG_CLK_DIVCTL1, (inpw(REG_CLK_DIVCTL1) & ~0xFF1F) | 0xe18);
3、N9H30兼容LCD的相關螢幕參數
首先調到如下函數
// Init LCD interface for ST7796S LCD module
vpostLCMInit(DIS_PANEL_E50A2V1);