- 129 -
<<Example format of a message>>
typedef struct user_msg{
T_MSG t_msg;
/* T_MSG structure */
B
data[16];
/* User message data */
} USER_MSG;
<<Example format of a message with priority included>>
typedef struct user_msg{
T_MSG_PRI
t_msg;
/* T_MSG_PRI structure */
B
data[16];
/* User message data */
} USER_MSG;
[
[
[
[
E
E
x
x
a
a
m
m
p
p
l
l
e
e
p
p
r
r
o
o
g
g
r
r
a
a
m
m
s
s
t
t
a
a
t
t
e
e
m
m
e
e
n
n
t
t
]
]
]
]
<<Example statement in C language>>
#include <itron.h>
#include <kernel.h>
#include “kernel_id.h”
typedef struct pri_message
{
T_MSG_PRI msgheader;
char body[12];
} PRI_MSG;
void task(void)
{
PRI_MSG
msg;
:
msg.msgpri = 5;
snd_mbx( ID_msg,(T_MSG *)&msg);
:
}
<<Example statement in assembly language>>
.include
mr100.inc
.GLB
task
_g_userMsg: .blkb
6
;
Header
.blkb
12
;
Body
task:
:
PUSH.W
R2
PUSH.L
A1
snd_mbx #ID_MBX1,#_g_userMsg
:
Содержание Emulator System M3T-MR100
Страница 3: ...M3T MR100 4 V 1 00 User s Manual User s Manual Rev 1 00 2007 09 Real time OS for R32C 100 Series...
Страница 6: ......
Страница 14: ......
Страница 16: ...xii...
Страница 18: ......
Страница 78: ......
Страница 242: ......
Страница 269: ...253 235 entry_address alm2 236 name ID_alm2 237 exinf 0x12345678 238 239 240 241 242 End of Configuration 243...
Страница 279: ...263...
Страница 290: ......
Страница 294: ......
Страница 304: ...288...
Страница 306: ...1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan M3T MR100 4 V 1 00 REJ10J1523 0100 User s Manual...