diff --git a/rtos/EventFlags.cpp b/rtos/EventFlags.cpp index 3d6b79321f..faa3057e3b 100644 --- a/rtos/EventFlags.cpp +++ b/rtos/EventFlags.cpp @@ -62,14 +62,14 @@ uint32_t EventFlags::get() const return osEventFlagsGet(_id); } -uint32_t EventFlags::wait_all(uint32_t flags, uint32_t timeout, bool clear) +uint32_t EventFlags::wait_all(uint32_t flags, uint32_t millisec, bool clear) { - return wait(flags, osFlagsWaitAll, timeout, clear); + return wait(flags, osFlagsWaitAll, millisec, clear); } -uint32_t EventFlags::wait_any(uint32_t flags, uint32_t timeout, bool clear) +uint32_t EventFlags::wait_any(uint32_t flags, uint32_t millisec, bool clear) { - return wait(flags, osFlagsWaitAny, timeout, clear); + return wait(flags, osFlagsWaitAny, millisec, clear); } EventFlags::~EventFlags() @@ -77,13 +77,13 @@ EventFlags::~EventFlags() osEventFlagsDelete(_id); } -uint32_t EventFlags::wait(uint32_t flags, uint32_t opt, uint32_t timeout, bool clear) +uint32_t EventFlags::wait(uint32_t flags, uint32_t opt, uint32_t millisec, bool clear) { if (clear == false) { opt |= osFlagsNoClear; } - return osEventFlagsWait(_id, flags, opt, timeout); + return osEventFlagsWait(_id, flags, opt, millisec); } } diff --git a/rtos/EventFlags.h b/rtos/EventFlags.h index a448807459..bac58ea588 100644 --- a/rtos/EventFlags.h +++ b/rtos/EventFlags.h @@ -87,23 +87,23 @@ public: /** Wait for all of the specified event flags to become signaled. @param flags the flags to wait for (default: 0 -- no flags). - @param timeout timeout value or 0 in case of no time-out (default: osWaitForever). + @param millisec timeout value (default: osWaitForever). @param clear clear specified event flags after waiting for them (default: true). @return event flags before clearing or error code if highest bit set (see @a osFlagsError for details). - @note You may call this function from ISR context if the timeout parameter is set to 0. + @note You may call this function from ISR context if the millisec parameter is set to 0. */ - uint32_t wait_all(uint32_t flags = 0, uint32_t timeout = osWaitForever, bool clear = true); + uint32_t wait_all(uint32_t flags = 0, uint32_t millisec = osWaitForever, bool clear = true); /** Wait for any of the specified event flags to become signaled. @param flags the flags to wait for (default: 0 -- no flags). - @param timeout timeout value or 0 in case of no timeout (default: osWaitForever). + @param millisec timeout value (default: osWaitForever). @param clear clear specified event flags after waiting for them (default: true). @return event flags before clearing or error code if highest bit set (see @a osFlagsError for details). - @note This function may be called from ISR context if the timeout parameter is set to 0. + @note This function may be called from ISR context if the millisec parameter is set to 0. */ - uint32_t wait_any(uint32_t flags = 0, uint32_t timeout = osWaitForever, bool clear = true); + uint32_t wait_any(uint32_t flags = 0, uint32_t millisec = osWaitForever, bool clear = true); /** EventFlags destructor. @@ -113,7 +113,7 @@ public: private: void constructor(const char *name = NULL); - uint32_t wait(uint32_t flags, uint32_t opt, uint32_t timeout, bool clear); + uint32_t wait(uint32_t flags, uint32_t opt, uint32_t millisec, bool clear); osEventFlagsId_t _id; mbed_rtos_storage_event_flags_t _obj_mem; }; diff --git a/rtos/Mail.h b/rtos/Mail.h index 4f8cc7cac1..70f6380d98 100644 --- a/rtos/Mail.h +++ b/rtos/Mail.h @@ -131,7 +131,7 @@ public: /** Get a mail from the queue. * - * @param millisec Timeout value or 0 in case of no timeout (default: osWaitForever). + * @param millisec Timeout value (default: osWaitForever). * * @return Event that contains mail information or error code. * @retval osEventMessage Message received. diff --git a/rtos/Mutex.h b/rtos/Mutex.h index a364b1c8dc..a4955a54c6 100644 --- a/rtos/Mutex.h +++ b/rtos/Mutex.h @@ -95,7 +95,7 @@ public: @deprecated Do not use this function. This function has been replaced with lock(), trylock() and trylock_for() functions. - @param millisec timeout value or 0 in case of no time-out. + @param millisec timeout value. @return status code that indicates the execution status of the function: @a osOK the mutex has been obtained. @a osErrorTimeout the mutex could not be obtained in the given time. @@ -117,7 +117,7 @@ public: bool trylock(); /** Try to lock the mutex for a specified time - @param millisec timeout value or 0 in case of no time-out. + @param millisec timeout value. @return true if the mutex was acquired, false otherwise. @note the underlying RTOS may have a limit to the maximum wait time due to internal 32-bit computations, but this is guaranteed to work if the diff --git a/rtos/Queue.h b/rtos/Queue.h index d204a75696..ff258915bf 100644 --- a/rtos/Queue.h +++ b/rtos/Queue.h @@ -167,7 +167,7 @@ public: * share the same priority level, they are retrieved in first-in, first-out * (FIFO) order. * - * @param millisec Timeout value or 0 in case of no time-out. + * @param millisec Timeout value. * (default: osWaitForever). * * @return Event information that includes the message in event. Message diff --git a/rtos/Semaphore.h b/rtos/Semaphore.h index 0bcd788de9..49e0f1e833 100644 --- a/rtos/Semaphore.h +++ b/rtos/Semaphore.h @@ -60,7 +60,7 @@ public: Semaphore(int32_t count, uint16_t max_count); /** Wait until a Semaphore resource becomes available. - @param millisec timeout value or 0 in case of no time-out. (default: osWaitForever). + @param millisec timeout value. (default: osWaitForever). @return number of available tokens, before taking one; or -1 in case of incorrect parameters @note You may call this function from ISR context if the millisec parameter is set to 0. diff --git a/rtos/ThisThread.h b/rtos/ThisThread.h index 33a2036e0b..d566fb5397 100644 --- a/rtos/ThisThread.h +++ b/rtos/ThisThread.h @@ -105,7 +105,7 @@ uint32_t flags_wait_any(uint32_t flags, bool clear = true); /** Wait for all of the specified Thread Flags to become signaled for the current thread. @param flags specifies the flags to wait for - @param millisec timeout value or 0 in case of no time-out. + @param millisec timeout value. @param clear whether to clear the specified flags after waiting for them. (default: true) @return actual thread flags before clearing, which may not satisfy the wait @note You cannot call this function from ISR context. @@ -129,7 +129,7 @@ uint32_t flags_wait_all_until(uint32_t flags, uint64_t millisec, bool clear = tr /** Wait for any of the specified Thread Flags to become signaled for the current thread. @param flags specifies the flags to wait for - @param millisec timeout value or 0 in case of no time-out. + @param millisec timeout value. @param clear whether to clear the specified flags after waiting for them. (default: true) @return actual thread flags before clearing, which may not satisfy the wait @note You cannot call this function from ISR context. diff --git a/rtos/Thread.h b/rtos/Thread.h index 34933e8bc2..34da08aa24 100644 --- a/rtos/Thread.h +++ b/rtos/Thread.h @@ -414,7 +414,7 @@ public: /** Wait for one or more Thread Flags to become signaled for the current RUNNING thread. @param signals wait until all specified signal flags are set or 0 for any single signal flag. - @param millisec timeout value or 0 in case of no time-out. (default: osWaitForever). + @param millisec timeout value. (default: osWaitForever). @return event flag information or error code. @note if @a millisec is set to 0 and flag is no set the event carries osOK value. @note You cannot call this function from ISR context.