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

coding style: moved RLE decoding code to lib/gfx

parent 6662f500
No related branches found
No related tags found
No related merge requests found
Pipeline #2017 passed
......@@ -8,8 +8,16 @@
static void bootloader_display_splash(void)
{
gfx_copy_region(&display_screen, 0, 0, 160, 80, GFX_RLE_MONO,
sizeof(splash), (const void *)(splash));
gfx_copy_region(
&display_screen,
0,
0,
160,
80,
GFX_RLE_MONO,
sizeof(splash),
(const void *)(splash)
);
gfx_update(&display_screen);
}
......
......@@ -54,8 +54,14 @@ int main(void)
card10_diag();
gfx_copy_region(
&display_screen, 0, 0, 160, 80, GFX_RAW, sizeof(Heart),
(const void *)(Heart)
&display_screen,
0,
0,
160,
80,
GFX_RAW,
sizeof(Heart),
(const void *)(Heart)
);
gfx_update(&display_screen);
......
......@@ -3,19 +3,19 @@
******************************************************************************/
/***** Includes *****/
#include "pmic.h"
#include "leds.h"
#include "card10.h"
#include "leds.h"
#include "pmic.h"
#include "gfx.h"
#include "display.h"
#include "gfx.h"
#include "tmr_utils.h"
#include <stdio.h>
#include <Heart.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <Heart.h>
int main(void)
{
......@@ -23,8 +23,14 @@ int main(void)
card10_diag();
gfx_copy_region(
&display_screen, 0, 0, 160, 80, GFX_RAW, sizeof(Heart),
(const void *)(Heart)
&display_screen,
0,
0,
160,
80,
GFX_RAW,
sizeof(Heart),
(const void *)(Heart)
);
gfx_update(&display_screen);
......
......@@ -31,8 +31,14 @@ int main(void)
card10_diag();
gfx_copy_region(
&display_screen, 0, 0, 160, 80, GFX_RAW, sizeof(Heart),
(const void *)(Heart)
&display_screen,
0,
0,
160,
80,
GFX_RAW,
sizeof(Heart),
(const void *)(Heart)
);
gfx_update(&display_screen);
......
......@@ -303,9 +303,9 @@ static void gfx_copy_region_mono(
const void *p
) {
const char *bp = p;
int bit = 0;
Color white = gfx_color(reg, WHITE);
Color black = gfx_color(reg, BLACK);
int bit = 0;
Color white = gfx_color(reg, WHITE);
Color black = gfx_color(reg, BLACK);
for (int y_ = 0; y_ < h; y_++) {
for (int x_ = 0; x_ < w; x_++) {
......@@ -341,9 +341,9 @@ static void gfx_copy_region_rle_mono(
const void *p
) {
const char *data = p;
int idx = 0;
Color white = gfx_color(reg, WHITE);
Color black = gfx_color(reg, BLACK);
int idx = 0;
Color white = gfx_color(reg, WHITE);
Color black = gfx_color(reg, BLACK);
for (int i = 0; i < size; i++) {
Color color = (data[i] & 0x80) ? white : black;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment