fb: cfb_shell: set pixel format as MONO10 or MONO01 on initializing
Set the display's pixel format to MONO10 or MONO01 that cfb supports on cfb initializing. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
This commit is contained in:
parent
279c722edb
commit
cccfc8fc8f
|
@ -416,6 +416,15 @@ static int cmd_init(const struct shell *shell, size_t argc, char *argv[])
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
err = display_set_pixel_format(dev, PIXEL_FORMAT_MONO10);
|
||||
if (err) {
|
||||
err = display_set_pixel_format(dev, PIXEL_FORMAT_MONO01);
|
||||
if (err) {
|
||||
shell_error(shell, "Failed to set required pixel format: %d", err);
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
err = display_blanking_off(dev);
|
||||
if (err) {
|
||||
shell_error(shell, "Failed to turn off display blanking: %d", err);
|
||||
|
|
Loading…
Reference in a new issue