Make drivers usable on devices with little RAM #222
Replies: 2 comments
-
I think you could try that. There might be a problem to use this together with the embedded_graphics library. Another solution would be to use a variable sized display (see examples/epd4in2_variable_size), which I also added for that purpose to still work together with the embedded_graphics stuff. |
Beta Was this translation helpful? Give feedback.
-
Unfinished commit: mgottschlag@fc18e6f I just noticed that this is really unnecessary for my application, though. It is more efficient to partition the display into 2 or 4 parts and use partial updates for those parts. Only on devices with very little RAM would such an interface make sense to reduce the overhead of frequent refresh window settings. |
Beta Was this translation helpful? Give feedback.
-
I want to use the library on a microcontroller with 16KiB SRAM, with the 400x300 pixel 4.2 inch display. The library, however, requires a full frame buffer of 400x300x1bit = 15000Byte, almost as much as the available RAM.
I would suggest the following interface to stream data into the library:
to be used with a corresponding function in the
WaveshareDisplay
trait:Do you think such an interface would make sense? The implementation in the driver is trivial (I'd add a
stream()
function to the interface, to replace thedata()
call previously used to transmit all the data to the display). The old full-buffer interface could even internally be implemented as an iterator returning a single element. However, I'd have to test whether that negatively impacts code size.If you think that's a good idea, I'd try to clean my code up a bit to create a first draft for further review.
Beta Was this translation helpful? Give feedback.
All reactions