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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TilCreator
firmware
Commits
c3bfdf18
Commit
c3bfdf18
authored
5 years ago
by
Benjamin Kunz
Browse files
Options
Downloads
Patches
Plain Diff
use mp_get_buffer_raise
parent
76e06651
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#3680
passed
5 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pycardium/modules/sys_display.c
+1
-5
1 addition, 5 deletions
pycardium/modules/sys_display.c
with
1 addition
and
5 deletions
pycardium/modules/sys_display.c
+
1
−
5
View file @
c3bfdf18
...
@@ -100,11 +100,7 @@ static mp_obj_t mp_display_pixels(size_t n_args, const mp_obj_t *args)
...
@@ -100,11 +100,7 @@ static mp_obj_t mp_display_pixels(size_t n_args, const mp_obj_t *args)
uint8_t
offset_y
=
mp_obj_get_int
(
args
[
2
]);
uint8_t
offset_y
=
mp_obj_get_int
(
args
[
2
]);
mp_buffer_info_t
bufinfo
;
mp_buffer_info_t
bufinfo
;
if
(
!
mp_obj_is_str_or_bytes
(
args
[
0
]))
{
mp_get_buffer_raise
(
args
[
0
],
&
bufinfo
,
MP_BUFFER_READ
);
mp_raise_TypeError
(
"input must be a string or bytes"
);
}
mp_get_buffer
(
args
[
0
],
&
bufinfo
,
MP_BUFFER_READ
);
if
(
bufinfo
.
buf
==
NULL
)
{
if
(
bufinfo
.
buf
==
NULL
)
{
return
mp_const_none
;
return
mp_const_none
;
...
...
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