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:
TOKITA Hiroshi 2023-02-23 09:43:26 +09:00 committed by Carles Cufí
parent 279c722edb
commit cccfc8fc8f

View file

@ -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);