fb: cfb: add const modifier for argument of cfb_print

cfb_print does not modify either address and contents of
the pointer that is pointing drawing text.
Thus, it can add a const modifier.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
This commit is contained in:
TOKITA Hiroshi 2023-03-02 23:02:43 +09:00 committed by Carles Cufí
parent 6663b558fa
commit b4965d672b
2 changed files with 2 additions and 2 deletions

View file

@ -87,7 +87,7 @@ struct cfb_font {
*
* @return 0 on success, negative value otherwise
*/
int cfb_print(const struct device *dev, char *str, uint16_t x, uint16_t y);
int cfb_print(const struct device *dev, const char *const str, uint16_t x, uint16_t y);
/**
* @brief Clear framebuffer.

View file

@ -128,7 +128,7 @@ static uint8_t draw_char_vtmono(const struct char_framebuffer *fb,
return fptr->width;
}
int cfb_print(const struct device *dev, char *str, uint16_t x, uint16_t y)
int cfb_print(const struct device *dev, const char *const str, uint16_t x, uint16_t y)
{
const struct char_framebuffer *fb = &char_fb;
const struct cfb_font *fptr;