Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Arist
firmware
Commits
7e91ee57
Commit
7e91ee57
authored
Feb 08, 2020
by
Arist
Browse files
fix(max86150): avoid stack overflow in pycardium by using smaller buf
parent
ae8ff5ae
Pipeline
#4497
passed with stages
in 2 minutes and 19 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
pycardium/modules/max86150.c
View file @
7e91ee57
...
...
@@ -28,7 +28,9 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(
STATIC
mp_obj_t
mp_max86150_read_sensor
(
mp_obj_t
stream_id_in
)
{
struct
max86150_sensor_data
buf
[
256
];
// do not use too big buf
// 256*12 is close to stack size of 4096, reduced to 64
struct
max86150_sensor_data
buf
[
64
];
int
stream_id
=
mp_obj_get_int
(
stream_id_in
);
int
n
=
epic_stream_read
(
stream_id
,
buf
,
sizeof
(
buf
));
...
...
Write
Preview
Supports
Markdown
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