stm32驱动LCD显示图片,因为是只读的 所以定义成const, 但编译老报错 提示数据类型不一样[mw_shl_code=c,true]const u8 cheng1[]={
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0C,
0xFC,0xFC,0x88,0x00,0x00,0x1C,0x78,0xF0,0xE0,0x00,0x80,0x80,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0xFF,0xFF,0x83,0x83,0x83,0x83,0x83,0x83,0xC3,0xC3,0x03,0x1F,
0xFF,0xFF,0x83,0x03,0x03,0x03,0xC3,0xF3,0xF3,0x63,0x03,0x03,0x00,0x00,0x00,0x00,
0x00,0x00,0xFC,0xFF,0x3F,0x00,0x80,0x00,0x00,0x80,0xFF,0xFF,0x03,0x00,0x00,0x03,
0x9F,0xFF,0xF8,0xF8,0xBE,0x1F,0x07,0x01,0x00,0x00,0xE0,0x20,0x00,0x00,0x20,0x38,
0x1F,0x07,0x01,0x00,0x00,0x01,0x01,0x07,0x07,0x23,0x31,0x18,0x0C,0x0E,0x07,0x03,
0x01,0x01,0x01,0x03,0x07,0x0F,0x0E,0x1C,0x1F,0x3F,0x30,0x00,0x00,0x00,0x00,0x00};[/mw_shl_code][mw_shl_code=c,true]void JLX19264_display_192x64(u8 *dp)
{
u8 i,j;
for(i=0;i<8;i++)
{
JLX19264_display_address(i+1,1);
for(j=0;j<192;j++)
{
JLX19264_send_data(*dp);
dp++;
}
}
} [/mw_shl_code]
main.c(210): error: #167: argument of type "const u8 *" is incompatible with parameter of type "u8 *"
静态变量只能用静态变量指针
因为静态变量是不能改变的 ,所以指针指向的数据是不能改变的,u8 * 指向的数据可以改变,所以报错
一周热门 更多>