事件标志组使用浅析。
1、头文件声明
#include "FreeRTOS.h"
#include "task.h"
#include "event_groups.h"
#include "timers.h"
#include "supporting_functions.h"
// 中断号 0 to 2 被用于 FreeRTOS Windows port
#define mainINTERRUPT_NUMBER 3
// 事件标志组三个位
#define mainFIRST_TASK_BIT ( 1UL << 0UL ) /* Event bit 0, which is set by a task. */
#define mainSECOND_TASK_BIT ( 1UL << 1UL ) /* Event bit 1, which is set by a task. */
#define mainISR_BIT ( 1UL << 2UL ) /* Event bit 2, which is set by an ISR. */
// 任务声明
static void vIntegerGenerator( void *pvParameters );
static void vEventBitSettingTask( void *pvParameters );
static void vEventBitReadingTask( void *pvParameters );
// daemon 任务,用于处理中断延时回调函数
void vPrintStringFromDaemonTask( voi