Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
firmware
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zenox
firmware
Commits
01258f29
Commit
01258f29
authored
Aug 11, 2019
by
Mateusz Zalega
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coding style: moved RLE decoding code to lib/gfx
Signed-off-by:
Mateusz Zalega
<
mateusz@appliedsourcery.com
>
parent
6662f500
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
19 deletions
+45
-19
bootloader/bootloader-display.c
bootloader/bootloader-display.c
+10
-2
epicardium/main.c
epicardium/main.c
+8
-2
hw-tests/dual-core/main.c
hw-tests/dual-core/main.c
+13
-7
hw-tests/hello-world/main.c
hw-tests/hello-world/main.c
+8
-2
lib/gfx/gfx.c
lib/gfx/gfx.c
+6
-6
No files found.
bootloader/bootloader-display.c
View file @
01258f29
...
...
@@ -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
);
}
...
...
epicardium/main.c
View file @
01258f29
...
...
@@ -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
);
...
...
hw-tests/dual-core/main.c
View file @
01258f29
...
...
@@ -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
);
...
...
hw-tests/hello-world/main.c
View file @
01258f29
...
...
@@ -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
);
...
...
lib/gfx/gfx.c
View file @
01258f29
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment