drivers: display: ssd1322: fix only part of the image being diplayed
Only the first chunk of the desired image is displayed repeatedly over the screen height (at least on an NHD-2.7-12864WDW3 display). Fix it by computing the internal mono01 to 4bit grayscale conversion buffer size correctly so it can fit the entire image. Signed-off-by: Johan Lafon <johan.lafon@syslinbit.com>
This commit is contained in:
parent
a140dd3de9
commit
2b5ee0ca91
|
@ -358,7 +358,9 @@ static struct display_driver_api ssd1322_driver_api = {
|
|||
};
|
||||
|
||||
#define SSD1322_CONV_BUFFER_SIZE(node_id) \
|
||||
(DT_PROP(node_id, width) * DT_PROP(node_id, segments_per_pixel) * 4)
|
||||
DIV_ROUND_UP(DT_PROP(node_id, width) * DT_PROP(node_id, height) * \
|
||||
DT_PROP(node_id, segments_per_pixel), \
|
||||
SEGMENTS_PER_BYTE)
|
||||
|
||||
#define SSD1322_DEFINE(node_id) \
|
||||
static uint8_t conversion_buf##node_id[SSD1322_CONV_BUFFER_SIZE(node_id)]; \
|
||||
|
|
Loading…
Reference in New Issue