
B–61863E–1/06
2. PMC SYSTEM CALLPMC LIBRARY
165
SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A
f f f f
[Name]
os_read_mbx
[Description]
Reads the low-order four bytes of the message from the mailbox.
[Format]
ret = os_read_mbx(mailbox_id,wait_limit,read_message) ;
unsigned short ret ;
unsigned char mailbox_id ;
long wait_limit ;
unsigned long *read_message ;
[Input]
mailbox_id Mailbox ID (10 to 39)
wait_limit If the mailbox is empty:
S For a positive value, the limit time waiting state is set
(one count: eight milliseconds).
S For 0, no limit time waiting state is set.
S For a negative value, the permanent waiting state is
set.
[Output]
read_message
[Returns]
ret Completion code
0 ; The message has been read normally from the mailbox.
0108H ; The mailbox ID is out of range (other than 10 to 39).
0114H ; There is no specified mailbox ID.
0118H ; The specified mailbox ID was deleted.
011AH ; The specified limit time has elapsed (for wait_limit > 0).
[Remarks]
If the mailbox is empty, the task enters the waiting state.
2.23
AREADING THE
FOUR-BYTE
MESSAGE FROM
THE MAILBOX