Skip to content
Snippets Groups Projects
Commit d6c17abe authored by Mateusz Zalega's avatar Mateusz Zalega
Browse files

coding style: reformatted LCD_Driver.c

parent 0c53de83
No related branches found
No related tags found
No related merge requests found
Pipeline #1810 failed
...@@ -322,8 +322,9 @@ void LCD_Update(void) ...@@ -322,8 +322,9 @@ void LCD_Update(void)
LCD_Set((uint8_t *)screen, sizeof(screen)); LCD_Set((uint8_t *)screen, sizeof(screen));
} }
static Color lcd_fb_encode_color_rgb(struct framebuffer *fb, uint8_t r, static Color
uint8_t g, uint8_t b) { lcd_fb_encode_color_rgb(struct framebuffer *fb, uint8_t r, uint8_t g, uint8_t b)
{
r >>= (8 - 5); r >>= (8 - 5);
g >>= (8 - 6); g >>= (8 - 6);
b >>= (8 - 5); b >>= (8 - 5);
...@@ -336,21 +337,22 @@ static Color lcd_fb_encode_color_rgb(struct framebuffer *fb, uint8_t r, ...@@ -336,21 +337,22 @@ static Color lcd_fb_encode_color_rgb(struct framebuffer *fb, uint8_t r,
return o; return o;
} }
static void lcd_fb_update(struct framebuffer *fb) { static void lcd_fb_update(struct framebuffer *fb)
{
LCD_Update(); LCD_Update();
} }
static struct framebuffer framebuffer = { static struct framebuffer framebuffer = { .data = screen,
.data = screen,
.width = LCD_WIDTH, .width = LCD_WIDTH,
.height = LCD_HEIGHT, .height = LCD_HEIGHT,
.stride = LCD_WIDTH * LCD_HEIGHT * 2, .stride = LCD_WIDTH * LCD_HEIGHT * 2,
.orientation = FB_O_180, .orientation = FB_O_180,
.encode_color_rgb = lcd_fb_encode_color_rgb, .encode_color_rgb =
.update = lcd_fb_update lcd_fb_encode_color_rgb,
}; .update = lcd_fb_update };
struct framebuffer *LCD_framebuffer(void) { struct framebuffer *LCD_framebuffer(void)
{
return &framebuffer; return &framebuffer;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment