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

[Question] - How to access framebuffer? #63

Open
paaspaas00 opened this issue Sep 20, 2024 · 1 comment
Open

[Question] - How to access framebuffer? #63

paaspaas00 opened this issue Sep 20, 2024 · 1 comment

Comments

@paaspaas00
Copy link

Hi, I'm working on a simple VNC server for one of the boards, the esp32-8048S050C.
I need to have access to the framebuffer to reply properly to VNC clients.
In the readme here https://github.com/rzeldent/platformio-espressif32-sunton/tree/main?tab=readme-ov-file#psram
you imply that for boards with direct io (like mine I think) there's actually a framebuffer at all times.
Is there a way to access it (maybe with some kind of mutex from another FreeRTOS task) easily or at all? Could you provide a little guidance?

Thank you!

@rzeldent
Copy link
Owner

The framebuffer is in the LVGL drivers. In lvgl_lcd_init the framebuffer is created:

//  Create drawBuffer
    uint32_t drawBufferSize = sizeof(lv_color_t) * LVGL_BUFFER_PIXELS;
    void *drawBuffer = heap_caps_malloc(drawBufferSize, LVGL_BUFFER_MALLOC_FLAGS);
    lv_display_set_buffers(display, drawBuffer, NULL, drawBufferSize, LV_DISPLAY_RENDER_MODE_PARTIAL);

You can access it, just reading it should not hurt... The format is R5G6B5

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

2 participants