Skip to content

Commit

Permalink
PiOS:MPU: De-Init EXTI Upon EXTI failure
Browse files Browse the repository at this point in the history
  • Loading branch information
tracernz authored and mlyle committed Apr 28, 2016
1 parent 06692b3 commit 736621b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flight/PiOS/Common/pios_mpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ static int32_t PIOS_MPU_Common_Init(void)

/* Wait 20 ms for data ready interrupt and make sure it happens twice */
if ((PIOS_Semaphore_Take(mpu_dev->data_ready_sema, 20) != true) ||
(PIOS_Semaphore_Take(mpu_dev->data_ready_sema, 20) != true)) {
(PIOS_Semaphore_Take(mpu_dev->data_ready_sema, 20) != true)) {
PIOS_EXTI_DeInit(mpu_dev->cfg->exti_cfg);
return -PIOS_MPU_ERROR_NOIRQ;
}

Expand Down

0 comments on commit 736621b

Please sign in to comment.