How to display image from QSPI flash?
Hi I've been trying to display an image on the GUI using an image (hex array) stored in the QSPI flash (memory mapped). I've taken a look at some of the documentation such as Loading Images at Runtime & Dynamic Bitmaps.
void LandingView::loadImageFromQSPI(Image& imageWidget)
{
BitmapId bmpId = Bitmap::dynamicBitmapCreateExternal(
185,
43,
(const void*)0x90FC0000,
Bitmap::RGB565
);
if (bmpId != BITMAP_INVALID)
{
imageWidget.setBitmap(Bitmap(bmpId));
imageWidget.invalidate(); // To trigger redraw
}
}
FrontendApplication::FrontendApplication(Model& m, FrontendHeap& heap)
: FrontendApplicationBase(m, heap)
{
Bitmap::setCache(touchgfxCache, sizeof(touchgfxCache));
}When debugging, I keep getting BITMAP_INVALID? I've made sure I'm in memory mapped mode.
