- 116 -
ref_flg Reference eventflag status iref_flg Reference eventflag status (handler only)
[
[[
[
C
C
L
La
an
ng
gu
ua
ag
ge
e
A
AP
PI
I
]
]]
]
ER ercd = ref_flg( ID flgid, T_RFLG *pk_rflg );
ER ercd = iref_flg( ID flgid, T_RFLG *pk_rflg );
z
z
P
Pa
ar
ra
am
me
et
te
er
rs
s
ID flgid ID number of the target eventflag
T_RFLG *pk_rflg Pointer to the packet to which eventflag status is returned
z
z
R
Re
et
tu
ur
rn
n
P
Pa
ar
ra
am
me
et
te
er
rs
s
ER ercd Terminated normally (E_OK)
T_RFLG *pk_rflg Pointer to the packet to which eventflag status is returned
Contents of pk_rflg
typedef struct t_rflg{
ID wtskid +0 2 Reception waiting task ID
FLGPTN flgptn +2 4 Current eventflag bit pattern
} T_RFLG;
[
[[
[
A
As
ss
se
em
mb
bl
ly
y
l
la
an
ng
gu
ua
ag
ge
e
A
AP
PI
I
]
]]
]
.include mr100.inc
ref_flg FLGID, PK_RFLG
iref_flg FLGID, PK_RFLG
z
z
P
Pa
ar
ra
am
me
et
te
er
rs
s
FLGID ID number of the target eventflag
PK_RFLG Pointer to the packet to which eventflag status is returned
z
z
R
Re
eg
gi
is
st
te
er
r
c
co
on
nt
te
en
nt
ts
s
a
af
ft
te
er
r
s
se
er
rv
vi
ic
ce
e
c
ca
al
ll
l
i
is
s
i
is
ss
su
ue
ed
d
Register name Content after service call is issued
R0 Error code
R2 ID number of the target eventflag
A1 Pointer to the packet to which eventflag status is returned
[
[[
[
E
Er
rr
ro
or
r
c
co
od
de
e
]
]]
]
None
[
[[
[
F
Fu
un
nc
ct
ti
io
on
na
al
l
d
de
es
sc
cr
ri
ip
pt
ti
io
on
n
]
]]
]
This service call returns various statuses of the eventflag indicated by flgid.
wtskid
Returned to wtskid is the ID number of the task at the top of a waiting queue (the next task to be dequeued). If no
tasks are kept waiting, TSK_NONE is returned.
flgptn
Returned to flgptn is the current eventflag bit pattern.
If this service call is to be issued from task context, use ref_flg; if issued from non-task context, use iref_flg.