fb: cfb_shell: correct invert command implementation

Fix the wrong calculation for inverting implemented by
commit 7068587505
("fb: cfb: support inverting with coordinates that do not align
 with the tile")

Remove the cfb_invert_area() calling.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
This commit is contained in:
TOKITA Hiroshi 2023-04-11 22:09:34 +09:00 committed by Anas Nashif
parent 75904f0d19
commit 476a5f57fd

View file

@ -375,17 +375,9 @@ static int cmd_invert(const struct shell *sh, size_t argc, char *argv[])
}
if (argc == 1) {
uint8_t width = cfb_get_display_parameter(dev, CFB_DISPLAY_WIDTH);
uint8_t height = cfb_get_display_parameter(dev, CFB_DISPLAY_HEIGH);
err = cfb_invert_area(dev, 0, 0, width, height);
if (err) {
shell_error(sh, "Error inverting area");
return err;
}
err = cfb_framebuffer_invert(dev);
if (err) {
shell_error(sh, "Error inverting Framebuffer");
return err;
}
} else if (argc == 5) {
@ -406,11 +398,6 @@ static int cmd_invert(const struct shell *sh, size_t argc, char *argv[])
return 0;
}
if (err) {
shell_error(sh, "Error inverting Framebuffer");
return err;
}
cfb_framebuffer_finalize(dev);
shell_print(sh, "Framebuffer Inverted");