PIC24 Support Libraries
|
Files | |
file | esos_mail.h |
Data Structures | |
struct | MAILBOX |
Macros | |
#define | __MAIL_MSG_MAX_DATA_LEN 16 |
#define | ESOS_TASK_HAS_MAIL(pstTask) |
#define | ESOS_TASK_IS_WAITING_MAIL_DELIVERY(TaskHandle) |
#define | ESOS_TASK_IVE_GOT_MAIL() |
#define | ESOS_TASK_WAIT_FOR_MAIL() |
#define | ESOS_TASK_WAIT_ON_TASKS_MAILBOX_HAS_AT_LEAST(pstTask, x) |
#define | ESOS_TASK_WAIT_ON_TASKS_MAILBOX_HAS_ROOM_MESSAGE(pstTask, pstMsg) |
#define | ESOS_TASK_MAILBOX_GET_AVAILABLE_LEN(pstTask) |
#define | ESOS_TASK_MAILBOX_GOT_EXACTLY_DATA_BYTES(pstTask, x) |
#define | ESOS_TASK_MAILBOX_GOT_AT_LEAST_DATA_BYTES(pstTask, x) |
#define | ESOS_TASK_FLUSH_TASK_MAILBOX(pstTask) |
Functions | |
void | __esos_SendMailUint8 (struct stTask *pst_Task, MAILBOX *pst_Mailbox, uint8_t *pau8_data, uint8_t u8_len) |
#define __MAIL_MSG_MAX_DATA_LEN 16 |
structure to contain a mail message "envelope" – a set of descriptors about a mail message and the contents within
Definition at line 80 of file esos_mail.h.
#define ESOS_TASK_FLUSH_TASK_MAILBOX | ( | pstTask | ) |
Flushes the specified task's mailbox contents. All unread data in the mailbox will be lost.
pstTask | pointer to task structure (ESOS_TASK_HANDLE) whose mailbox will be flushed |
Definition at line 230 of file esos_mail.h.
#define ESOS_TASK_HAS_MAIL | ( | pstTask | ) |
Determines if a task has mail ready to be read/consumed.
pstTask | A pointer to the ESOS_TASK_HANDLE of the task being queried |
Definition at line 119 of file esos_mail.h.
#define ESOS_TASK_IS_WAITING_MAIL_DELIVERY | ( | TaskHandle | ) |
Determines if a task is waiting on an acknowledgment from another task reading its mail... a.k.a. "signature confirmation" or "delivery confirmation"
TaskHandle | The ESOS_TASK_HANDLE of the task being queried |
Definition at line 129 of file esos_mail.h.
#define ESOS_TASK_IVE_GOT_MAIL | ( | ) |
Determines if the current task has mail to be read
Returns TRUE if the current task has mail ready to be read. else it returns FALSE.
Definition at line 141 of file esos_mail.h.
#define ESOS_TASK_MAILBOX_GET_AVAILABLE_LEN | ( | pstTask | ) |
Evaluates to the number of bytes available in the mailbox association with an arbitrary task pstTask
pstTask | pointer to task structure |
N | number of bytes available for writing in task's mailbox |
Definition at line 191 of file esos_mail.h.
#define ESOS_TASK_MAILBOX_GOT_AT_LEAST_DATA_BYTES | ( | pstTask, | |
x | |||
) |
Evaluates to the booelan to determine if the specified task's mailbox has at least x bytes available for holding messages
pstTask | pointer to task structure (ESOS_TASK_HANDLE) |
x | number of bytes to check for |
TRUE | if task's mailbox has x bytes or more |
FALSE | otherwise |
Definition at line 216 of file esos_mail.h.
#define ESOS_TASK_MAILBOX_GOT_EXACTLY_DATA_BYTES | ( | pstTask, | |
x | |||
) |
Evaluates to the booelan to determine if the specified task's mailbox has exactly x bytes available for holding messages
pstTask | pointer to task structure (ESOS_TASK_HANDLE) |
x | number of bytes to check for |
TRUE | if task's mailbox has exactly x bytes |
FALSE | otherwise |
Definition at line 203 of file esos_mail.h.
#define ESOS_TASK_WAIT_FOR_MAIL | ( | ) |
Blocks the current task until a mailbox message has arrived
This function blocks and waits until the task has a message in its mailbox.
Definition at line 150 of file esos_mail.h.
#define ESOS_TASK_WAIT_ON_TASKS_MAILBOX_HAS_AT_LEAST | ( | pstTask, | |
x | |||
) |
Block current task until the specified task's mailbox has at least x bytes available for holding messages
pstTask | pointer to task structure (ESOS_TASK_HANDLE) |
x | number of bytes to check for |
TRUE | if task's mailbox has x bytes or more |
FALSE | otherwise |
Definition at line 164 of file esos_mail.h.
#define ESOS_TASK_WAIT_ON_TASKS_MAILBOX_HAS_ROOM_MESSAGE | ( | pstTask, | |
pstMsg | |||
) |
Block the current task until the specified recipient task mailbox has room for the specified message
pstTask | pointer to task structure (ESOS_TASK_HANDLE) |
pstMsg | message for which room must be found |
TRUE | if task's mailbox has x bytes or more; |
FALSE | otherwise |
Definition at line 180 of file esos_mail.h.
void __esos_SendMailUint8 | ( | struct stTask * | pst_Task, |
MAILBOX * | pst_Mailbox, | ||
uint8_t * | pau8_data, | ||
uint8_t | u8_len | ||
) |
Writes a mail message into some task's mailbox
pst_Task | handle tretval verNum Version number. Exact value and meaning depends on hardware |
pst_Mailbox | Pointer to struct instance of MAILBOX. |
pau8_data | Pointer to mail data to send. |
u8_len | Local instance of length of message. |