From d6c17abe81f3b6f9f44b2063bdd5d97435b1a0a8 Mon Sep 17 00:00:00 2001 From: Mateusz Zalega <mateusz@appliedsourcery.com> Date: Fri, 9 Aug 2019 18:10:01 +0200 Subject: [PATCH] coding style: reformatted LCD_Driver.c Signed-off-by: Mateusz Zalega <mateusz@appliedsourcery.com> --- lib/gfx/LCD/LCD_Driver.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/lib/gfx/LCD/LCD_Driver.c b/lib/gfx/LCD/LCD_Driver.c index 51f48ec2b..481d6929f 100644 --- a/lib/gfx/LCD/LCD_Driver.c +++ b/lib/gfx/LCD/LCD_Driver.c @@ -314,7 +314,7 @@ void LCD_Set(uint8_t *data, int len) uint8_t *LCD_Framebuffer(void) { - return (uint8_t*)screen; + return (uint8_t *)screen; } void LCD_Update(void) @@ -322,8 +322,9 @@ void LCD_Update(void) LCD_Set((uint8_t *)screen, sizeof(screen)); } -static Color lcd_fb_encode_color_rgb(struct framebuffer *fb, uint8_t r, - uint8_t g, uint8_t b) { +static Color +lcd_fb_encode_color_rgb(struct framebuffer *fb, uint8_t r, uint8_t g, uint8_t b) +{ r >>= (8 - 5); g >>= (8 - 6); b >>= (8 - 5); @@ -336,21 +337,22 @@ static Color lcd_fb_encode_color_rgb(struct framebuffer *fb, uint8_t r, return o; } -static void lcd_fb_update(struct framebuffer *fb) { +static void lcd_fb_update(struct framebuffer *fb) +{ LCD_Update(); } -static struct framebuffer framebuffer = { - .data = screen, - .width = LCD_WIDTH, - .height = LCD_HEIGHT, - .stride = LCD_WIDTH * LCD_HEIGHT * 2, - .orientation = FB_O_180, +static struct framebuffer framebuffer = { .data = screen, + .width = LCD_WIDTH, + .height = LCD_HEIGHT, + .stride = LCD_WIDTH * LCD_HEIGHT * 2, + .orientation = FB_O_180, - .encode_color_rgb = lcd_fb_encode_color_rgb, - .update = lcd_fb_update -}; + .encode_color_rgb = + lcd_fb_encode_color_rgb, + .update = lcd_fb_update }; -struct framebuffer *LCD_framebuffer(void) { +struct framebuffer *LCD_framebuffer(void) +{ return &framebuffer; } -- GitLab