User`s guide
Architecture
AT85C51SND3Bx Firmware User’s Guide 5-25
7691A–MP3–08/07
“event” is an information dedicated to MMI applications, sent by a task to inform on
its status or to give feedback of a previously executed command.
These messages are mailed in two separate mailboxes, based on FIFO stacks.
The uni-directional communication system is the direct access at the public routines pro-
vide by modules.
5.3.3.1 Message Format
Command and event messages are composed of 2 words:
– a unique ID
– an optional 16-bit parameter
Command message format
Figure 5-4. Command message format
The command message ID is composed of two bytes that define:
– the task to which this message is dedicated (“task_id”)
– the ID of one of the task commands to execute (“task_cmd_id”)
Command messages are defined in the file “lib_system\mailbox\mail_cmd.h”.
Event message format
Figure 5-5. Event message format
The event message IDs are 8-bit values. One of the tasks are frozen and defined in the
file “lib_system\mailbox\mail_evt.h”.
Event messages can be defined by the customer to make possible specific communica-
tions between MMI applications. These must be defined in the custom file
“mmi\common\com_evt.h”.
Message parameter
The optional “param” is a 16-bit argument being able to pass data of different types:
– one or two single bytes with the help of the macros LSB(), MSB():
LSB(param) = byte1; MSB(param) = byte2;
– the address of data, on 16 bits only although supplementary bits are required to
get the complete address of data. Thus, the memory type to which the data
belongs must be known at the delivering of this kind of message to point properly
the data.
// Preparation in message mailing
xdata U8 table[10];
param = U16( &table[0] );
// Message delivery
_MEM_TYPE_SLOW_ U8* ptr_table;
ptr_table = (xdata U8*) param;
cm d _id
task_id
cm d _idcm d _id
15 8 7 0
param
task _cm d_id
15 8 7 0
evt _id
7 0
evt
param
15 8 7 0