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
card10
firmware
Commits
e2e5a259
Verified
Commit
e2e5a259
authored
Aug 24, 2019
by
Rahix
Browse files
fix(bhi160): Wait before initialization so PMIC can go first
Signed-off-by:
Rahix
<
rahix@rahix.de
>
parent
81e1412a
Pipeline
#3340
passed with stages
in 1 minute and 45 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
epicardium/modules/bhi.c
View file @
e2e5a259
...
...
@@ -412,6 +412,11 @@ void vBhi160Task(void *pvParameters)
bhi160_task_id
=
xTaskGetCurrentTaskHandle
();
bhi160_mutex
=
xSemaphoreCreateMutexStatic
(
&
bhi160_mutex_data
);
/*
* Wait a little before initializing BHI160.
*/
vTaskDelay
(
pdMS_TO_TICKS
(
500
));
int
lockret
=
hwlock_acquire
(
HWLOCK_I2C
,
pdMS_TO_TICKS
(
100
));
if
(
lockret
<
0
)
{
LOG_CRIT
(
"bhi160"
,
"Failed to acquire I2C lock!"
);
...
...
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