Skip to content

Commit

Permalink
drivers: display: ssd1322: fix only part of the image being diplayed
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
faloj authored and mmahadevan108 committed Nov 7, 2024
1 parent a140dd3 commit 2b5ee0c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/display/ssd1322.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)]; \
Expand Down

0 comments on commit 2b5ee0c

Please sign in to comment.