samples: cfb: support MONO01 pixel format
When the pixel format fails to set to MONO10, try to set it to MONO01. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
This commit is contained in:
parent
038351ad26
commit
cedcd2d94e
|
@ -26,8 +26,10 @@ int main(void)
|
|||
}
|
||||
|
||||
if (display_set_pixel_format(dev, PIXEL_FORMAT_MONO10) != 0) {
|
||||
printf("Failed to set required pixel format\n");
|
||||
return 0;
|
||||
if (display_set_pixel_format(dev, PIXEL_FORMAT_MONO01) != 0) {
|
||||
printf("Failed to set required pixel format");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
printf("Initialized %s\n", dev->name);
|
||||
|
|
|
@ -21,8 +21,10 @@ int main(void)
|
|||
}
|
||||
|
||||
if (display_set_pixel_format(display, PIXEL_FORMAT_MONO10) != 0) {
|
||||
printk("Failed to set required pixel format\n");
|
||||
return 0;
|
||||
if (display_set_pixel_format(display, PIXEL_FORMAT_MONO01) != 0) {
|
||||
printk("Failed to set required pixel format");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (display_blanking_off(display) != 0) {
|
||||
|
|
Loading…
Reference in a new issue