const unsigned char gImage_1
uint16_t *p;
p=gImage_1[0];/*这里老是出问题 ..\USER\main.c(6451): error: #513: a value of type "unsigned char" cannot be assigned to an entity of type "uint16_t *"*/
SystemInit();
delay_init();
LCD_Initializtion();
LCD_BackLight_Init();
LCD_Clear(Red);
LCD_DrawPicture(0,0,303,231,p);
//GUI_Text(68,144,"HY-MiniSTM32V",White,Red);
//GUI_Text(52,160,"Development Board",White,Red);
/* Infinite loop */
while (1)
{
char i;
for(i=100; i>0; i--)
{
LCD_BackLight(i*10);
delay_ms(500);
}
}
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t* file, uint32_t line)
{
while (1)
{
}
}
高手你太犀利了 编译毫无任何错误通过了 不过液晶屏上没显示图片 一片茫茫的
是不是要驱动驱动液晶屏??
其实还有个void LCD_DrawPicture(uint16_t StartX,uint16_t StartY,uint16_t EndX,uint16_t EndY,uint16_t *pic)
{
uint16_t i;
LCD_SetCursor(StartX,StartY);
LCD_WriteRAM_Prepare();
for (i=0;i<(EndX*EndY);i++)
{
LCD_WriteRAM(*pic++);
}
} 我是想利用指针显示gImage_1这个数组 由于数组太长就没有放上来了 能帮我想想办法吗?
p=gImage_1;或 p=&gImage_1[0]; 都是可以的吧。
追问其实不可以…………
看这个就知道怎么回事了