9:邮箱
邮箱SYS/BIOS系统用来在任务间进行buffer传输的,在邮箱创建的时候配置传输buffer的大小,Mailbox_post()函数执行完成代表,邮箱buffer已经传输到缓冲区,当执行Mailbox_pend()时,就从缓冲区中获得数据。
邮箱的创建:Mailbox_HandleMailbox_create(SizeT bufsize,
UInt numBufs,
Mailbox_Params *params,
Error_Block *eb)
Void Mailbox_delete(Mailbox_Handle*handle);
Mailbox_pend()是用来从邮箱中读取Bufferde,如果邮箱中没有Buffer就等待timeout 的时间;
Bool Mailbox_pend(Mailbox_Handle handle,
Ptr buf,
UInt timeout);
Mailbox_post()是用来存入Buffer到邮箱,如果邮箱已满,则等待timeout时间;
Bool Mailbox_post(Mailbox_Handle handle,
Ptr buf,
UInt timeout);f
|