beautypg.com

Renesas Emulator System M3T-MR100 User Manual

Page 145

background image

- 129 -



<>

typedef struct user_msg{

T_MSG t_msg;

/* T_MSG structure */

B

data[16];

/* User message data */

} USER_MSG;


<>

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

]

]

]

]

<>

#include
#include
#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);

:

}

<>
.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

: