Texas Instruments TMS320 User Manual page 170

Dsp/bios v5.40
Hide thumbs Also See for TMS320:
Table of Contents

Advertisement

Mailboxes
Example 4-14. Posting a Message to a Mailbox
4.8.1
MBX Example
4-66
Bool MBX_post(mbx, msg, timeout)
Bool MBX_post(mbx, msg, timeout)
MBX_Handle
MBX_Handle
mbx;
mbx;
Void
Void
*msg;
*msg;
Uns
Uns
timeout;
timeout;
Example 4-15 provides sample code showing two types of tasks created
statically: a single reader task which removes messages from the mailbox,
and multiple writer tasks which insert messages into the mailbox. The
resultant trace from Example 4-15 is shown in Figure 4-15.
Note:
When called within an HWI, the code sequence calling MBX_post must be
either wrapped within an HWI_enter/HWI_exit pair or invoked by the HWI
dispatcher.
/* return after this many */
/* return after this many */
/* system clock ticks */
/* system clock ticks */

Advertisement

Table of Contents
loading

Table of Contents