Here’s the code. And all the strings like REG_PCLK_FREQ_RATIO_0 are defined macros, whose values are commented at the end of each line. The compiler said:“undefined reference to memcpy.” at this line “unsigned long lcd_hw_init[2]”.
unsigned long lcd_hw_init[2]=
{
{REG_PCLK_FREQ_RATIO_0 ,0xff},//0x158
{REG_PCLK_FREQ_RATIO_1 ,0xff},//0x159
{REG_PCLK_FREQ_RATIO_2 ,0x00},//0x15a
{REG_PANEL_TYPE ,0x72},//0x10 /serial tft/
{REG_MOD_RATE ,0x00},//0x11
{REG_HORIZ_TOTAL_0 ,0x18},//0x12
{REG_HORIZ_TOTAL_1 ,0x07},//0x13
{REG_HDP ,0x15},//0x14
{REG_HDP_START_POS0 ,0x0a},//0x16
{REG_HDP_START_POS1 ,0x00},//0x17
{REG_VERT_TOTAL0 ,0xef},//0x18
{REG_VERT_TOTAL1 ,0x00},//0x19
{REG_VDP0 ,0xdb},//0x1C
{REG_VDP1 ,0x00},//0x1D
{REG_VDP_START_POS0 ,0x03},//0x1e
{REG_VDP_START_POS1 ,0x00},//0x1f
{REG_HSYNC_PULSE_WIDTH ,0x81},//0x20
{REG_HSYNC_PULSE_START_POS0 ,0x00},//0x22
{REG_HSYNC_PULSE_START_POS1 ,0x00},//0x23
{REG_VSYNC_PULSE_WIDTH ,0x80},//0x24
{REG_VSYNC_PULSE_START_POS0 ,0x00},//0x26
{REG_VSYNC_PULSE_START_POS1 ,0x00},//0x27
{REG_GPIO_STATUS_CONTROL1 ,0x00},//0xac
{REG_HRTFT_SPECIAL_OUTPUT ,0x01},//0x38
{REG_DISPLAY_MODE ,0xC4},//0x70//default off
{REG_DV_OFORMAT ,0x00},//0x1a4
{REG_HORIZ_TOTAL_0 ,0x15},//0x12
{REG_HORIZ_TOTAL_1 ,0x07},//0x13
{REG_HDP ,0x13},//0x14
{REG_HDP_START_POS0 ,0x04},//0x16
{REG_VERT_TOTAL0 ,240},//0x18
{REG_VDP0 ,239},//0x1c
{REG_VDP_START_POS0 ,0},//0x1e
{REG_FPFRAME_START_OFFSET0 ,1},//0x30
{REG_HSYNC_PULSE_START_POS0 ,1},//0x22
// {REG_DV_FRAME_SAMPLING, 0x01},//0x161
{REG_LLINE_PULSE_START_SUBPIXEL_POS, 0x03},//0x21=3pixels
{REG_LCD_SUBPIXEL_ALIGNMENT, 0x04},//0x42=BRG/RGB
// {REG_DV_SUBPIXEL_MODE, 0x02},
//0x1a5=enable subpixel accurate horizontal decimation in DV and set “1st row inside,2nd row outside”=0x02
{REG_DEFINE_END ,0x00}//0xFFFF
};
Here’s my Makefile.