Skip to content

Allow passing buffers to HAL initialisation#14

Merged
tuupola merged 6 commits into060-changesfrom
auto-malloc
Jun 13, 2022
Merged

Allow passing buffers to HAL initialisation#14
tuupola merged 6 commits into060-changesfrom
auto-malloc

Conversation

@tuupola
Copy link
Copy Markdown
Owner

@tuupola tuupola commented Jun 9, 2022

So you can either do it the easy way:

hagl_backend_t *backend = hagl_init();

Or provide buffers and in the future other configuration manually.

hagl_backend_t backend;
memset(&backend, 0, sizeof(hagl_backend_t));
backend.buffer = malloc(DISPLAY_WIDTH * DISPLAY_HEIGHT * (DISPLAY_DEPTH / 8));
hagl_hal_init(&backend);

tuupola added 6 commits June 10, 2022 02:30
hagl_backend_t backend;
memset(&backend, 0, sizeof(hagl_backend_t));
backend.buffer = malloc(MIPI_DISPLAY_WIDTH * MIPI_DISPLAY_HEIGHT * (DISPLAY_DEPTH / 8));
hagl_hal_init(&backend);
hagl_backend_t backend;
memset(&backend, 0, sizeof(hagl_backend_t));
backend.buffer = malloc(MIPI_DISPLAY_WIDTH * MIPI_DISPLAY_HEIGHT * (DISPLAY_DEPTH / 8));
backend.buffer2 = malloc(MIPI_DISPLAY_WIDTH * MIPI_DISPLAY_HEIGHT * (DISPLAY_DEPTH / 8));
hagl_hal_init(&backend);
@tuupola tuupola merged commit 9f273e3 into 060-changes Jun 13, 2022
@tuupola tuupola deleted the auto-malloc branch June 13, 2022 05:54
tuupola added a commit that referenced this pull request Sep 16, 2022
* Add backend config as parameter
* Allow passing buffers to HAL initialisation
* Change width, height and depth to integers
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

Successfully merging this pull request may close these issues.

1 participant