Wait for measurement to complete light sensor init
This commit is contained in:
parent
29ed80730d
commit
5ffaee918a
|
@ -55,6 +55,9 @@ void LightSensor_Init(void)
|
||||||
NVIC_EnableIRQ(TIM14_IRQn);
|
NVIC_EnableIRQ(TIM14_IRQn);
|
||||||
|
|
||||||
LightSensor_Measure();
|
LightSensor_Measure();
|
||||||
|
|
||||||
|
while(!LightSensor_NewMeasurement);
|
||||||
|
LightSensor_Poll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LightSensor_Poll(void)
|
void LightSensor_Poll(void)
|
||||||
|
|
Loading…
Reference in a new issue