beautypg.com

Renesas Emulator System M3T-MR100 User Manual

Page 209

background image

- 193 -

[

[

[

[

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”
void task()
{
H

data;

:

if( vrcv_dtq( ID_dtq, &data ) != E_RLWAI )

error(“forced wakeup\n”);

:

if( vprcv_dtq( ID_dtq, &data ) != E_TMOUT )

error(“Timeout\n”);

:

if( vtrcv_dtq( ID_dtq, &data, 10 ) != E_TMOUT )

error(“Timeout\n”);

:

}

<>
.include

mr100.inc

.GLB

task

task:

:

PUSH.W

R2

PUSHM

R6R4

vtrcv_dtq

#ID_DTQ1,#TMO_POL

:

PUSH.W

R2

vprcv_dtq

#ID_DTQ2

:

PUSH.W

R2

vrcv_dtq #ID_DTQ2

: