|
本帖最后由 wanglanshu 于 2020-6-21 18:00 编辑
如题用PROGMEM语句把一串数组存到闪存里了
const uint16_t newint[4096] PROGMEM = {0Xffff,0Xffff,0Xffff,0Xffff....};
然后调用时报错UTFT_Demo_160x128_Serial_HW:322:42: error: invalid conversion from 'const uint16_t* {aka const short unsigned int*}' to 'short unsigned int*' [-fpermissive]
myGLCD.drawBitmap (0, 0, 64, 64, newint,2);
库函数声明是void UTFT::drawBitmap(int x, int y, int sx, int sy, bitmapdatatype data, int scale)
读闪存的代码是
pgm_read_word(&data[(ty*sx)+tx]);
这个代码在UNO上跑起来是没问题的能出图,也不会报错
|
|