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:
parent
6663b558fa
commit
b4965d672b
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue