This commit is contained in:
Mysteo
2023-08-02 07:42:27 +03:00
parent 222f758a2b
commit 7732cf6280
4 changed files with 56 additions and 45 deletions

View File

@@ -103,6 +103,7 @@ void vl6180_init (void)
/* Enable Dmax calculation only if value is displayed (to save computation power) */
//VL6180_DMaxSetState(theVL6180Dev, DMaxDispTime>0);
VL6180_ClearAllInterrupt(theVL6180Dev);
VL6180_RangeStartSingleShot(theVL6180Dev);
allowIT = 1;
}
@@ -279,6 +280,8 @@ void HAL_GPIO_EXTI_Falling_Callback(uint16_t GPIO_Pin)
uint8_t vl6180_single_shot ()
{
VL6180_RangeStartSingleShot(theVL6180Dev);
VL6180_ClearAllInterrupt(theVL6180Dev);
}
int32_t vl6180_is_ready ()