mirror of
https://github.com/eclipse/upm.git
synced 2025-03-15 04:57:30 +03:00
max30100: ISR recover attempt
Handle failure in ISR routine - attempt to read status and FIFO registers and continue sampleing (vs exiting and turning off continuous sampling). Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
parent
bd47b9ed45
commit
6769d976a0
@ -397,9 +397,15 @@ static void _internal_sample_rdy(void *arg)
|
|||||||
* log an error in syslog and attempt to stop sampling
|
* log an error in syslog and attempt to stop sampling
|
||||||
* Handle all failing cases here */
|
* Handle all failing cases here */
|
||||||
max30100_sample_rdy_fail:
|
max30100_sample_rdy_fail:
|
||||||
syslog(LOG_CRIT, "%s: _internal_sample_rdy() failed, attempting to stop sampling...\n",
|
syslog(LOG_CRIT,
|
||||||
|
"%s: _internal_sample_rdy() failed, attempting to restart sampling...\n",
|
||||||
__FUNCTION__);
|
__FUNCTION__);
|
||||||
max30100_sample_stop(dev);
|
|
||||||
|
/* Read FIFO AND status register in a last attempt to continue
|
||||||
|
* sampling, ignore result */
|
||||||
|
max30100_read(dev, MAX30100_REG_FIFO_WR_PTR, &tmp);
|
||||||
|
max30100_read(dev, MAX30100_REG_INTERRUPT_STATUS, &tmp);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user