Hard fault whwn calling imagePush #648
Replies: 2 comments 1 reply
-
hi, the sprite instance isn't attached to anything, it should either be attached to the display when creating the object: auto canvas = lgfx::LGFX_Sprite(&tft); ... or the target (can be display or another sprite) should be specified when pushing the sprite: canvas.pushImage(&tft, 0, 0, 48, 48, (uint16_t*)rgb_test); if you still get crashes after that then it's probably that RGB_TEST_WIDTH*RGB_TEST_HEIGHT is not equal to 24 |
Beta Was this translation helpful? Give feedback.
-
Acyually i am trying to use teh library on an unsupported MCU ... STM32h7 with LTDC display ... my idea was to draw on a canvas than transfer teh canvas to the display using STM32 specific function calls .. i ven found a librarty taht already stripped hardware dependencies from lovyanGFX https://github.com/Forairaaaaa/lgfx_slim |
Beta Was this translation helpful? Give feedback.
-
Hello ...
When i run below code i get a hard fault at pushImage
#define RGB_TEST_HEIGHT 6
#define RGB_TEST_WIDTH 4
// array size is 48
static const uint16_t rgb_test[] = {
0xf800, 0xf800, 0xf800, 0xf800,
0xf800, 0xf800, 0xf800, 0xf800,
0x07e0, 0x07e0, 0x07e0, 0x07e0,
0x07e0, 0x07e0, 0x07e0, 0x07e0,
0x001f, 0x001f, 0x001f, 0x001f,
0x001f, 0x001f, 0x001f, 0x001f
};
int main(void) {
}
Beta Was this translation helpful? Give feedback.
All reactions