Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stefan Haun
firmware
Commits
b15d6e79
Commit
b15d6e79
authored
5 years ago
by
Stefan Haun
Browse files
Options
Downloads
Patches
Plain Diff
Fix code formatting
parent
5cbcd7e5
Branches
framebuffer-overlay
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#4140
passed
5 years ago
Stage: build
Stage: test
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
epicardium/modules/display.c
+33
-32
33 additions, 32 deletions
epicardium/modules/display.c
lib/card10/display.c
+26
-27
26 additions, 27 deletions
lib/card10/display.c
pycardium/modules/sys_display.c
+17
-12
17 additions, 12 deletions
pycardium/modules/sys_display.c
with
76 additions
and
71 deletions
epicardium/modules/display.c
+
33
−
32
View file @
b15d6e79
...
...
@@ -198,7 +198,8 @@ void compositor()
fb_pixel
(
overlay_screen
.
fb
,
x
,
y
);
uint8_t
*
target
=
fb_pixel
(
display_screen
.
fb
,
x
,
y
);
if
((
overlay_pixel
[
0
]
==
0
)
&&
(
overlay_pixel
[
1
]
==
0
))
{
if
((
overlay_pixel
[
0
]
==
0
)
&&
(
overlay_pixel
[
1
]
==
0
))
{
uint8_t
*
app_pixel
=
fb_pixel
(
application_screen
.
fb
,
x
,
y
);
target
[
0
]
=
app_pixel
[
0
];
...
...
This diff is collapsed.
Click to expand it.
lib/card10/display.c
+
26
−
27
View file @
b15d6e79
...
...
@@ -18,11 +18,11 @@ struct txt_buffer display_textb;
/***** Virtual framebuffers *****/
static
uint8_t
app_buffer
[
LCD_HEIGHT
][
LCD_WIDTH
][
2
];
static
struct
framebuffer
app_framebuffer
=
{
.
data
=
app_buffer
,
static
struct
framebuffer
app_framebuffer
=
{
.
data
=
app_buffer
,
.
width
=
LCD_WIDTH
,
.
height
=
LCD_HEIGHT
,
.
stride
=
LCD_WIDTH
*
LCD_HEIGHT
*
2
,
.
stride
=
LCD_WIDTH
*
LCD_HEIGHT
*
2
,
.
orientation
=
FB_O_180
,
.
update
=
NULL
};
...
...
@@ -30,11 +30,11 @@ static struct framebuffer app_framebuffer = {
struct
gfx_region
application_screen
;
static
uint8_t
ovl_buffer
[
LCD_HEIGHT
][
LCD_WIDTH
][
2
];
static
struct
framebuffer
ovl_framebuffer
=
{
.
data
=
ovl_buffer
,
static
struct
framebuffer
ovl_framebuffer
=
{
.
data
=
ovl_buffer
,
.
width
=
LCD_WIDTH
,
.
height
=
LCD_HEIGHT
,
.
stride
=
LCD_WIDTH
*
LCD_HEIGHT
*
2
,
.
stride
=
LCD_WIDTH
*
LCD_HEIGHT
*
2
,
.
orientation
=
FB_O_180
,
.
update
=
NULL
};
...
...
@@ -99,5 +99,4 @@ void display_init_slim(void)
ovl_framebuffer
.
encode_color_rgb
=
display_screen
.
fb
->
encode_color_rgb
;
overlay_screen
=
gfx_screen
(
&
ovl_framebuffer
);
gfx_clear
(
&
overlay_screen
);
}
This diff is collapsed.
Click to expand it.
pycardium/modules/sys_display.c
+
17
−
12
View file @
b15d6e79
...
...
@@ -250,15 +250,18 @@ static mp_obj_t mp_display_set_fullscreen(mp_obj_t enable_obj)
}
return
mp_const_none
;
}
static
MP_DEFINE_CONST_FUN_OBJ_1
(
display_set_fullscreen_obj
,
mp_display_set_fullscreen
);
static
MP_DEFINE_CONST_FUN_OBJ_1
(
display_set_fullscreen_obj
,
mp_display_set_fullscreen
);
static
mp_obj_t
mp_display_is_fullscreen
()
{
bool
res
=
epic_disp_is_fullscreen
();
return
mp_obj_new_bool
(
res
);
}
static
MP_DEFINE_CONST_FUN_OBJ_0
(
display_is_fullscreen_obj
,
mp_display_is_fullscreen
);
static
MP_DEFINE_CONST_FUN_OBJ_0
(
display_is_fullscreen_obj
,
mp_display_is_fullscreen
);
/* Overlay mode is not exposed to Python apps*/
...
...
@@ -276,8 +279,10 @@ static MP_DEFINE_CONST_FUN_OBJ_0(display_close_obj, mp_display_close);
static
const
mp_rom_map_elem_t
display_module_globals_table
[]
=
{
{
MP_ROM_QSTR
(
MP_QSTR___name__
),
MP_ROM_QSTR
(
MP_QSTR_sys_display
)
},
{
MP_ROM_QSTR
(
MP_QSTR_open
),
MP_ROM_PTR
(
&
display_open_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_set_fullscreen
),
MP_ROM_PTR
(
&
display_set_fullscreen_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_is_fullscreen
),
MP_ROM_PTR
(
&
display_is_fullscreen_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_set_fullscreen
),
MP_ROM_PTR
(
&
display_set_fullscreen_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_is_fullscreen
),
MP_ROM_PTR
(
&
display_is_fullscreen_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_close
),
MP_ROM_PTR
(
&
display_close_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_print
),
MP_ROM_PTR
(
&
display_print_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_print_adv
),
MP_ROM_PTR
(
&
display_print_adv_obj
)
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment