FreeRTOS 事件标志组

信号量同步只能与单个的事件或任务进行同步。事件标志组与多个事件或任务进行同步
事件位用来表明某个事件是否发生,事件组是一组事件位
1

//动态方法创建事件标志组
EventGroupHandle_t xEventGroupCreate( void )

//设置事件位
EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToSet )

//事件组等待
EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToWaitFor, 
const BaseType_t xClearOnExit, const BaseType_t xWaitForAllBits, TickType_t xTicksToWait )

//事件查询
#define xEventGroupGetBits( xEventGroup ) xEventGroupClearBits( xEventGroup, 0 )
EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup, const EventBits_t uxBitsToClear )
posted @ 2018-05-09 15:40  thomas_blog  阅读(159)  评论(0编辑  收藏  举报