Skip to content
Snippets Groups Projects
Verified Commit e2e5a259 authored by rahix's avatar rahix
Browse files

fix(bhi160): Wait before initialization so PMIC can go first


Signed-off-by: default avatarRahix <rahix@rahix.de>
parent 81e1412a
No related branches found
No related tags found
No related merge requests found
......@@ -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!");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment