mirror of https://github.com/ARMmbed/mbed-os.git
parent
30b8da9d4f
commit
d4b3da6700
18
rtos/Mail.h
18
rtos/Mail.h
|
|
@ -55,9 +55,9 @@ namespace rtos {
|
|||
template<typename T, uint32_t queue_sz>
|
||||
class Mail : private mbed::NonCopyable<Mail<T, queue_sz> > {
|
||||
public:
|
||||
/** Create and Initialise Mail queue.
|
||||
/** Create and Initialize Mail queue.
|
||||
*
|
||||
* @note This function cannot be called from ISR context.
|
||||
* @note You cannot call this function from ISR context.
|
||||
*/
|
||||
Mail() { };
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ public:
|
|||
*
|
||||
* @return True if the mail queue is empty, false if not
|
||||
*
|
||||
* @note This function may be called from ISR context.
|
||||
* @note You may call this function from ISR context.
|
||||
*/
|
||||
bool empty() const {
|
||||
return _queue.empty();
|
||||
|
|
@ -75,7 +75,7 @@ public:
|
|||
*
|
||||
* @return True if the mail queue is full, false if not
|
||||
*
|
||||
* @note This function may be called from ISR context.
|
||||
* @note You may call this function from ISR context.
|
||||
*/
|
||||
bool full() const {
|
||||
return _queue.full();
|
||||
|
|
@ -85,7 +85,7 @@ public:
|
|||
@param millisec timeout value or 0 in case of no time-out. (default: 0).
|
||||
@return pointer to memory block that can be filled with mail or NULL in case error.
|
||||
|
||||
@note This function may be called from ISR context if the millisec parameter is set to 0.
|
||||
@note You may call this function from ISR context if the millisec parameter is set to 0.
|
||||
*/
|
||||
T* alloc(uint32_t millisec=0) {
|
||||
return _pool.alloc();
|
||||
|
|
@ -95,7 +95,7 @@ public:
|
|||
@param millisec timeout value or 0 in case of no time-out. (default: 0).
|
||||
@return pointer to memory block that can be filled with mail or NULL in case error.
|
||||
|
||||
@note This function may be called from ISR context if the millisec parameter is set to 0.
|
||||
@note You may call this function from ISR context if the millisec parameter is set to 0.
|
||||
*/
|
||||
T* calloc(uint32_t millisec=0) {
|
||||
return _pool.calloc();
|
||||
|
|
@ -105,7 +105,7 @@ public:
|
|||
@param mptr memory block previously allocated with Mail::alloc or Mail::calloc.
|
||||
@return status code that indicates the execution status of the function.
|
||||
|
||||
@note This function may be called from ISR context.
|
||||
@note You may call this function from ISR context.
|
||||
*/
|
||||
osStatus put(T *mptr) {
|
||||
return _queue.put(mptr);
|
||||
|
|
@ -115,7 +115,7 @@ public:
|
|||
@param millisec timeout value or 0 in case of no time-out. (default: osWaitForever).
|
||||
@return event that contains mail information or error code.
|
||||
|
||||
@note This function may be called from ISR context if the millisec parameter is set to 0.
|
||||
@note You may call this function from ISR context if the millisec parameter is set to 0.
|
||||
*/
|
||||
osEvent get(uint32_t millisec=osWaitForever) {
|
||||
osEvent evt = _queue.get(millisec);
|
||||
|
|
@ -129,7 +129,7 @@ public:
|
|||
@param mptr pointer to the memory block that was obtained with Mail::get.
|
||||
@return status code that indicates the execution status of the function.
|
||||
|
||||
@note This function may be called from ISR context.
|
||||
@note You may call this function from ISR context.
|
||||
*/
|
||||
osStatus free(T *mptr) {
|
||||
return _pool.free(mptr);
|
||||
|
|
|
|||
Loading…
Reference in New Issue