/*-- 调入了一幅图像:C:\Documents and Settings\Administrator\桌面\320240\sed1335的例子\试\bmp\未标题-2.bmp --*/
/*-- 宽度x高度=320x240 --*/
const u8 char_seg0[] ={
0x0E,0x07,0x00,0x00,0xE0,0x00,0x30,0x00,0x00,0xC0,0x3E,0x00,0x06,0x00,0x06,0x7C,
0x1C,0x00,0x66,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x07,0x00,0x00,0x38,0x67,0x00,
0x0E,0x00,0x00,0x7C,0x00,0x1F,0xE0,0xE0,0x0F,0x86,0x30,0x60,0xE0,0x60,0x31,0xFF, .................................}
void Picture_display(u16 row,u8 column,
u8 *picture_code,u16 width,
u16 high,u8 mode)
{
/* 图形模式下在指定行指定列显示指定大小的图形 */
/* row-行(以像素为单位) column-列(以字节为单位) *picture_code-图形数组 */
/* width-图形宽度(以像素为单位) high-图形高度(以像素为单位) */
/* mode-显示模式:1-正常 2-反白 */
u8 i,j,d_code;
LCD_order(0x4c);
width = width / 8;
for(i=0;i<high;i++)
{
Graph_locate(row,column);
LCD_order(0x42);
for(j=0;j<width;j++)
{
d_code = *picture_code;
if(mode==2) d_code = ~d_code;
LCD_write(d_code);
picture_code++;
}
row++;
}
}
void Test_LCD(void)
{
/* 测试液晶显示屏 */
// Init_system();
LCD_cls();
Screen_switch(0x59,0x44);
  icture_display(1,1,char_seg0,320,240,1);
shu_play_0();
}
这是一个单色液晶的测试程序,在51上没问题,已通过,但移值到STM32上编辑不能通过;
error: #167 :argument of type " const u8 * " is incompatible with parameter of type " u8 * "
请大家赐教,谢谢!
|