Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
flow3r 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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
flow3r
flow3r firmware
Commits
3d3fade5
Commit
3d3fade5
authored
1 year ago
by
pippin
Committed by
pippin
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
mp: add binding for fbconfig
parent
d855500c
No related branches found
No related tags found
1 merge request
!509
virtual framebuffer
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/micropython/usermodule/mp_sys_display.c
+8
-0
8 additions, 0 deletions
components/micropython/usermodule/mp_sys_display.c
with
8 additions
and
0 deletions
components/micropython/usermodule/mp_sys_display.c
+
8
−
0
View file @
3d3fade5
...
@@ -29,6 +29,13 @@ STATIC mp_obj_t mp_overlay_clip(size_t n_arge, const mp_obj_t *args) {
...
@@ -29,6 +29,13 @@ STATIC mp_obj_t mp_overlay_clip(size_t n_arge, const mp_obj_t *args) {
STATIC
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN
(
mp_overlay_clip_obj
,
4
,
4
,
STATIC
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN
(
mp_overlay_clip_obj
,
4
,
4
,
mp_overlay_clip
);
mp_overlay_clip
);
STATIC
mp_obj_t
mp_fbconfig
(
size_t
n_arge
,
const
mp_obj_t
*
args
)
{
st3m_gfx_fbconfig
(
mp_obj_get_int
(
args
[
0
]),
mp_obj_get_int
(
args
[
1
]),
mp_obj_get_int
(
args
[
2
]),
mp_obj_get_int
(
args
[
3
]));
return
mp_const_none
;
}
STATIC
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN
(
mp_fbconfig_obj
,
4
,
4
,
mp_fbconfig
);
STATIC
mp_obj_t
mp_set_backlight
(
mp_obj_t
percent_in
)
{
STATIC
mp_obj_t
mp_set_backlight
(
mp_obj_t
percent_in
)
{
uint8_t
percent
=
mp_obj_get_int
(
percent_in
);
uint8_t
percent
=
mp_obj_get_int
(
percent_in
);
flow3r_bsp_display_set_backlight
(
percent
);
flow3r_bsp_display_set_backlight
(
percent
);
...
@@ -136,6 +143,7 @@ STATIC const mp_rom_map_elem_t mp_module_sys_display_globals_table[] = {
...
@@ -136,6 +143,7 @@ STATIC const mp_rom_map_elem_t mp_module_sys_display_globals_table[] = {
{
MP_ROM_QSTR
(
MP_QSTR_set_palette
),
MP_ROM_PTR
(
&
mp_set_palette_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_set_palette
),
MP_ROM_PTR
(
&
mp_set_palette_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_set_backlight
),
MP_ROM_PTR
(
&
mp_set_backlight_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_set_backlight
),
MP_ROM_PTR
(
&
mp_set_backlight_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_overlay_clip
),
MP_ROM_PTR
(
&
mp_overlay_clip_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_overlay_clip
),
MP_ROM_PTR
(
&
mp_overlay_clip_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_fbconfig
),
MP_ROM_PTR
(
&
mp_fbconfig_obj
)
},
{
MP_ROM_QSTR
(
MP_QSTR_default
),
MP_ROM_INT
((
int
)
st3m_gfx_default
)
},
{
MP_ROM_QSTR
(
MP_QSTR_default
),
MP_ROM_INT
((
int
)
st3m_gfx_default
)
},
{
MP_ROM_QSTR
(
MP_QSTR_rgb332
),
MP_ROM_INT
((
int
)
st3m_gfx_rgb332
)
},
{
MP_ROM_QSTR
(
MP_QSTR_rgb332
),
MP_ROM_INT
((
int
)
st3m_gfx_rgb332
)
},
...
...
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