Put a mail in the queue. @param mptr memory block previously allocated with Mail::alloc or Mail::calloc. @return status code that indicates the execution status of the function. */
| 43 | @return status code that indicates the execution status of the function. |
| 44 | */ |
| 45 | bool put(T *mptr, int32_t millisec = 0) |
| 46 | { |
| 47 | rt_int32_t tick; |
| 48 | |
| 49 | if (millisec < 0) |
| 50 | tick = -1; |
| 51 | else |
| 52 | tick = rt_tick_from_millisecond(millisec); |
| 53 | |
| 54 | return rt_mb_send_wait(&mID, (rt_ubase_t)mptr, tick) == RT_EOK; |
| 55 | } |
| 56 | |
| 57 | /** Get a mail from a queue. |
| 58 | @param millisec timeout value or 0 in case of no time-out. (default: osWaitForever). |
nothing calls this directly
no test coverage detected