为灵活、有效地在多任务程序设计中应用μC/OS-Ⅲ操作系统中的邮箱,采用理论分析与实例实验相结合的方法,得到基于μC/OS-Ⅲ操作系统的邮箱机制在全双工任务间通信、二值信号量和充当延迟函数等方面的应用技巧和方法。实验表明,邮箱的灵活应用不仅可以实现传统的任务间数据通信,还可以方便地替代互斥信号量和实现延时功能。
In order to ingeniously and efficiently use mailbox of μC/OS-Ⅲ operation system in the design of muhitask pro- gram, a method to combine theoretical analysis with experiment was adopted. The application skills and method of mailbox based on μC/OS-Ⅲ operation system in the aspects of full duplex intertask communications, binary semaphore and delay func- tion were achieved. The experimental results show the flexible application of mailbox can not only realize the traditional intertask data communications, but also replace the mutual exclusion semaphore and implement the delav function.