Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hard Fault when using pushImage #1

Open
mesbahuddin opened this issue Nov 16, 2024 · 0 comments
Open

Hard Fault when using pushImage #1

mesbahuddin opened this issue Nov 16, 2024 · 0 comments

Comments

@mesbahuddin
Copy link

Hello...

i was trying to us your lgfx_slim but i faced followinhg issue :

teh code crashes (harrd fault) when ever i execute 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) {

auto canvas = lgfx::LGFX_Sprite();
canvas.createSprite(RGB_TEST_WIDTH, RGB_TEST_HEIGHT);
canvas.setColorDepth(lgfx::rgb565_nonswapped);

canvas.pushImage(0, 0, RGB_TEST_WIDTH, RGB_TEST_HEIGHT, (uint16_t*)rgb_test);

/* Infinite loop */
while (1) {
	HAL_Delay(500);
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant