mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
Use WFI while waiting for snapshots.
This commit is contained in:
parent
274f9bc445
commit
0f9456fd37
@ -686,6 +686,9 @@ int sensor_snapshot(image_t *image, line_filter_t line_filter_func, void *line_f
|
|||||||
|
|
||||||
// Wait for frame
|
// Wait for frame
|
||||||
while ((DCMI->CR & DCMI_CR_CAPTURE) != 0) {
|
while ((DCMI->CR & DCMI_CR_CAPTURE) != 0) {
|
||||||
|
// Wait for interrupt
|
||||||
|
__WFI();
|
||||||
|
|
||||||
if ((HAL_GetTick() - tick_start) >= 3000) {
|
if ((HAL_GetTick() - tick_start) >= 3000) {
|
||||||
// Sensor timeout, most likely a HW issue.
|
// Sensor timeout, most likely a HW issue.
|
||||||
// Abort the DMA request.
|
// Abort the DMA request.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user