Renesas M3T-MR100 Network Card User Manual


 
- 133 -
ref_mbx Reference mailbox status
iref_mbx Reference mailbox status (handler only)
[
[
[
[
C
C
L
L
a
a
n
n
g
g
u
u
a
a
g
g
e
e
A
A
P
P
I
I
]
]
]
]
ER ercd = ref_mbx( ID mbxid, T_RMBX *pk_rmbx );
ER ercd = iref_mbx( ID mbxid, T_RMBX *pk_rmbx );
z
z
P
P
a
a
r
r
a
a
m
m
e
e
t
t
e
e
r
r
s
s
ID mbxid ID number of the target mailbox
T_RMBX *pk_rmbx Pointer to the packet to which mailbox status is returned
z
z
R
R
e
e
t
t
u
u
r
r
n
n
P
P
a
a
r
r
a
a
m
m
e
e
t
t
e
e
r
r
s
s
ER ercd Terminated normally (E_OK)
T_RMBX *pk_rmbx Pointer to the packet to which mailbox status is returned
Contents of pk_rmbx
typedef struct t_rmbx{
ID wtskid +0 2 Reception waiting task ID
T_MSG *pk_msg +4 4 Next message packet to be received
} T_RMBX;
[
[
[
[
A
A
s
s
s
s
e
e
m
m
b
b
l
l
y
y
l
l
a
a
n
n
g
g
u
u
a
a
g
g
e
e
A
A
P
P
I
I
]
]
]
]
.include mr100.inc
ref_mbx MBXID, PK_RMBX
iref_mbx MBXID, PK_RMBX
z
z
P
P
a
a
r
r
a
a
m
m
e
e
t
t
e
e
r
r
s
s
MBXID ID number of the target mailbox
PK_RMBX Pointer to the packet to which mailbox status is returned
z
z
R
R
e
e
g
g
i
i
s
s
t
t
e
e
r
r
c
c
o
o
n
n
t
t
e
e
n
n
t
t
s
s
a
a
f
f
t
t
e
e
r
r
s
s
e
e
r
r
v
v
i
i
c
c
e
e
c
c
a
a
l
l
l
l
i
i
s
s
i
i
s
s
s
s
u
u
e
e
d
d
Register name Content after service call is issued
R0 Error code
R2 ID number of the target mailbox
A1 Pointer to the packet to which mailbox status is returned
[
[
[
[
E
E
r
r
r
r
o
o
r
r
c
c
o
o
d
d
e
e
]
]
]
]
None
[
[
[
[
F
F
u
u
n
n
c
c
t
t
i
i
o
o
n
n
a
a
l
l
d
d
e
e
s
s
c
c
r
r
i
i
p
p
t
t
i
i
o
o
n
n
]
]
]
]
This service call returns various statuses of the mailbox indicated by mbxid.
wtskid
Returned to wtskid is the ID number of the task at the top of a reception waiting queue (the next task to be de-
queued). If no tasks are kept waiting, TSK_NONE is returned.
*pk_msg
Returned to *pk_msg is the start address of the next message to be received. If there are no messages to be re-
ceived next, NULL is returned. T_MSG* should be specified with a 32-bit address.
If this service call is to be issued from task context, use ref_mbx; if issued from non-task context, use iref_mbx.