Verified Commit e2e5a259 authored by Rahix's avatar Rahix
Browse files

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


Signed-off-by: Rahix's avatarRahix <rahix@rahix.de>
parent 81e1412a
Pipeline #3340 passed with stages
in 1 minute and 45 seconds
......@@ -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!");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment