Is there a standardised way of adding graphics support to a port? #15175
Replies: 3 comments 1 reply
-
Two related options come into mind:
|
Beta Was this translation helpful? Give feedback.
-
Thanks, but as I have about 10kB of free RAM after system overheads, having any kind of framebuffer at all won't work! I forgot to say that my screen is a standard ST7735 connected via SPI, with its own internal framebuffer, so a local framebuffer isn't needed, Adafruit_GFX-style. (Which I can't use, because I don't have a C++ compiler.) I suppose copying modframebuf.c and modifying it to work via SPI is feasible, but that feels like it's reinventing the wheel. |
Beta Was this translation helpful? Give feedback.
-
The standard way of using framebuf is to have the full screen worth buffered, so this only really works on devices with a lot of ram. Lvgl on the other hand is designed to only have a very small portion buffered at any time which is used to assemble your display widgets etc. So it would possibly work in this case, though I'm not sure just how little ram it can effectively work with. There's no real standard way to integrate lvgl currently however, though there's a few people working on it at the moment so watch this space. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The board I'm doing a port for has a screen. I'd like to support this.
I don't see any other ports with anything that looks obviously like a graphics library, but I do see a bewildering array of external libraries which do this. Is the intention that graphics is out-of-scope for the port?
The reason I ask is that I have some particular requirements: I'm on a device with extremely limited RAM but has lots of flash, and so need something which doesn't have a local framebuffer, has the bulk of the code in C, etc. In this situation, is it appropriate to embed the library into the port, or does this belong as an external driver? If the former, is there any particular API I should be following?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions