aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-08-31 17:32:29 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-08-31 17:32:29 +0000
commit5f454cad47e60e5562b092bb64aec334a375cdb9 (patch)
tree8b5e456b4c1fa38f778389b0d20a3f2b5d337f1a /os/hal/src
parent6c97d4f6fb4184c41f6283ce025a7030280a1802 (diff)
downloadChibiOS-5f454cad47e60e5562b092bb64aec334a375cdb9.tar.gz
ChibiOS-5f454cad47e60e5562b092bb64aec334a375cdb9.tar.bz2
ChibiOS-5f454cad47e60e5562b092bb64aec334a375cdb9.zip
Improved icuWaitCapture().
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7212 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/src')
-rw-r--r--os/hal/src/icu.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/os/hal/src/icu.c b/os/hal/src/icu.c
index fcccab727..298e1cb28 100644
--- a/os/hal/src/icu.c
+++ b/os/hal/src/icu.c
@@ -133,7 +133,7 @@ void icuStartCapture(ICUDriver *icup) {
}
/**
- * @brief Waits for the first cycle activation edge.
+ * @brief Waits for the next cycle activation edge.
* @details The function waits for the next PWM input activation front then
* brings the driver in the @p ICU_ACTIVE state.
* @note If notifications are enabled then the transition to the
@@ -148,7 +148,8 @@ void icuWaitCapture(ICUDriver *icup) {
osalDbgCheck(icup != NULL);
osalSysLock();
- osalDbgAssert(icup->state == ICU_WAITING, "invalid state");
+ osalDbgAssert((icup->state == ICU_WAITING) || (icup->state == ICU_ACTIVE),
+ "invalid state");
icuWaitCaptureI(icup);
osalSysUnlock();
}