diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-10-17 07:31:40 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-10-17 07:31:40 +0000 |
commit | a708e083e1cf6f6181bcd02baf9cc580f38b5397 (patch) | |
tree | 17ee42a1d3ec12fff765ec5c8a94b4b03f47f0c9 /os/hal/src/icu.c | |
parent | b1586a7e3afed45889903b1096d8b03412768478 (diff) | |
download | ChibiOS-a708e083e1cf6f6181bcd02baf9cc580f38b5397.tar.gz ChibiOS-a708e083e1cf6f6181bcd02baf9cc580f38b5397.tar.bz2 ChibiOS-a708e083e1cf6f6181bcd02baf9cc580f38b5397.zip |
Improvements to the ICU driver.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7409 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/src/icu.c')
-rw-r--r-- | os/hal/src/icu.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/os/hal/src/icu.c b/os/hal/src/icu.c index 92f8a2f1e..9f7a6b6c6 100644 --- a/os/hal/src/icu.c +++ b/os/hal/src/icu.c @@ -134,6 +134,11 @@ void icuStartCapture(ICUDriver *icup) { /**
* @brief Waits for a completed capture.
+ * @note The operation could be performed in polled mode depending on.
+ * @note In order to use this function notifications must be disabled.
+ * @pre The driver must be in @p ICU_WAITING or @p ICU_ACTIVE modes.
+ * @post After the capture is available the driver is in @p ICU_ACTIVE
+ * mode.
*
* @param[in] icup pointer to the @p ICUDriver object
*
@@ -146,7 +151,10 @@ void icuWaitCapture(ICUDriver *icup) { osalSysLock();
osalDbgAssert((icup->state == ICU_WAITING) || (icup->state == ICU_ACTIVE),
"invalid state");
- icuWaitCaptureI(icup);
+ osalDbgAssert(icuAreNotificationsEnabledX(icup) == false,
+ "notifications enabled");
+ icu_lld_wait_capture(icup);
+ icup->state = ICU_ACTIVE;
osalSysUnlock();
}
|