## RGB Screen

• Configure PAD to TTL mode
# vi infinity2m-ssc011a-s01a-padmux-display.dtsi
/*
*
* Copyright (c) [2019~2020] SigmaStar Technology.
*
*
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License version 2 for more details.
*
*/

#include <../../../../drivers/sstar/include/mdrv_puse.h>

/ {
soc {
schematic =
<PAD_PM_IRIN            PINMUX_FOR_PM_IRIN_MODE     MDRV_PUSE_IR>,  // IR: default non-GPIO
<PAD_SAR_GPIO0          PINMUX_FOR_SAR_MODE     MDRV_PUSE_SAR_GPIO0 >, // sar: default not-GPIO,
//<PAD_SAR_GPIO1  >,                // sar: default not-GPIO
//<PAD_SAR_GPIO2  >,                // sar: default not-GPIO
//<PAD_ETH_RN  >,                   // ETH: default not-GPIO
//<PAD_ETH_RP  >,                   // ETH: default not-GPIO
//<PAD_ETH_TN  >,                   // ETH: default not-GPIO
//<PAD_ETH_TP  >,                   // ETH: default not-GPIO
<PAD_DM_P1              PINMUX_FOR_USB_MODE     MDRV_PUSE_UTMI1_DM >,  // utmi: default not-GPIO
<PAD_DP_P1              PINMUX_FOR_USB_MODE     MDRV_PUSE_UTMI1_DP >,  // utmi: default not-GPIO
<PAD_DM_P2              PINMUX_FOR_USB_MODE     MDRV_PUSE_UTMI2_DM >,  // utmi: default not-GPIO
<PAD_DP_P2              PINMUX_FOR_USB_MODE     MDRV_PUSE_UTMI2_DP >,  // utmi: default not-GPIO
status = "ok"; // ok or disable
//status = "disable";
};

};

};
• Obtain the schedule from the data book on the screen

• Modify screen parameters

Link from Baidu cloud —– Download JpegPlayer.rar And unzip, find SAT070CP50_1024x600.h, and modify the corresponding data according to the actual parameters of the screen
For the screen parameters of the 7-inch development board with its own screen, please refer to the screen parameters file in the network disk: development board —-> lcd folder for verification

# vi SAT070CP50_1024x600.h

Focus on the values of the following variables:
m_ucPanelHSyncWidth = HSYNC.(FrontPorch) + HSYNC.(PulseWidth)
m_ucPanelHSyncBackPorch = HSYNC.(BackPorch)
m_ucPanelVSyncWidth = VSYNC.(FrontPorch) + VSYNC.(PulseWidth)
m_ucPanelVBackPorch = VSYNC.(BackPorch)
m_wPanelHStart = m_ucPanelHSyncWidth + m_ucPanelHSyncBackPorch
m_wPanelVStart = m_ucPanelVSyncWidth + m_ucPanelVBackPorch
m_wPanelWidth = HSYNC.(DisplayPeriod)
m_wPanelHeight = VSYNC.(DisplayPeriod)

m_wPanelMaxHTotal
=m_wPanelHTotal
=m_wPanelMinHTotal
=m_wPanelHStart + m_wPanelWidth

m_dwPanelMaxDCLK
=m_dwPanelDCLK
=m_dwPanelMinDCLK
=m_wPanelHTotalm_wPanelVTotalFPS(user-defined)

(DCLKFrequency).min <= m_dwPanelMaxDCLK <= (DCLKFrequency).max

• Modify the value of swap
3,  //MS_U8 m_bPanelSwapOdd_RG    :1;          ///<  define PANEL_SWAP_ODD_RG
2,  //MS_U8 m_bPanelSwapEven_RG   :1;          ///<  define PANEL_SWAP_EVEN_RG
1,  //MS_U8 m_bPanelSwapOdd_GB    :1;          ///<  define PANEL_SWAP_ODD_GB
1,  //MS_U8 m_bPanelSwapEven_GB   :1;          ///<  define PANEL_SWAP_EVEN_GB


By default, the corresponding relationship between each TTL pin and RGB is as follows:

If the actual connection is not the default connection, you need to modify the swap value. We need to pay attention to the following four values:

M_bPanelSwapOdd_RG, if value is 0 or 3, corresponds to R; if value is 1, corresponding to B; if value is 2, it corresponds to G;

m_bPanelSwapEven_RG, if value is 0 or 2, corresponds to R; if value is 1, corresponding to B; if value is 3, it corresponds to G;

m_bPanelSwapOdd_GB，if value is 0 or 1, corresponds to B; if value is 3, corresponding to R; if value is 2, it corresponds to G;

m_bPanelSwapEven_GB, if value is 0, the RGB high and low bits are not reversed; if value is 1, the RGB high and low bits are reversed;

In the case that the high and low positions are not reversed, the corresponding relationship of pins is as follows:

After the high and low bit are reversed, the pin correspondence becomes: