Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: addressable_leds
Mail< T, queue_sz > Class Template Reference
The Mail class allow to control, send, receive, or wait for mail. More...
#include <Mail.h>
| Public Member Functions | |
| Mail () | |
| Create and Initialise Mail queue. | |
| T * | alloc (uint32_t millisec=0) | 
| Allocate a memory block of type T. | |
| T * | calloc (uint32_t millisec=0) | 
| Allocate a memory block of type T and set memory block to zero. | |
| osStatus | put (T *mptr) | 
| Put a mail in the queue. | |
| osEvent | get (uint32_t millisec=osWaitForever) | 
| Get a mail from a queue. | |
| osStatus | free (T *mptr) | 
| Free a memory block from a mail. | |
Detailed Description
template<typename T, uint32_t queue_sz>
 class rtos::Mail< T, queue_sz >
The Mail class allow to control, send, receive, or wait for mail.
A mail is a memory block that is send to a thread or interrupt service routine.
- Template Parameters:
- 
  T data type of a single message element. queue_sz maximum number of messages in queue. 
Definition at line 38 of file Mail.h.
Constructor & Destructor Documentation
Member Function Documentation
| T* alloc | ( | uint32_t | millisec = 0) | 
| T* calloc | ( | uint32_t | millisec = 0) | 
| osStatus free | ( | T * | mptr ) | 
| osEvent get | ( | uint32_t | millisec = osWaitForever) | 
| osStatus put | ( | T * | mptr ) | 
Put a mail in the queue.
- Parameters:
- 
  mptr memory block previously allocated with Mail::alloc or Mail::calloc. 
- Returns:
- status code that indicates the execution status of the function.
Generated on Tue Jul 12 2022 15:55:57 by
 1.7.2
 1.7.2