Skip to content

Commit

Permalink
samples: cfb_custom_font: Add condition for display capabilities check
Browse files Browse the repository at this point in the history
Disable display capability validation if defined
CHARACTER_FRAMEBUFFER_TRANSFER_WITH_PIXEL_FORMAT_CONVERSION.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
  • Loading branch information
soburi committed Jun 5, 2023
1 parent 6dde3a4 commit e30ac83
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions samples/subsys/display/cfb_custom_font/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ int main(void)
printk("Display device not ready\n");
}

#ifndef CONFIG_CHARACTER_FRAMEBUFFER_TRANSFER_WITH_PIXEL_FORMAT_CONVERSION
if (display_set_pixel_format(display, PIXEL_FORMAT_MONO10) != 0) {
printk("Failed to set required pixel format\n");
return 0;
}
#endif

if (display_blanking_off(display) != 0) {
printk("Failed to turn off display blanking\n");
Expand Down

0 comments on commit e30ac83

Please sign in to comment.