Task1(){//此任务等待所有标志
OSFlagPend( (OS_FLAG_GRP *)&ADCSimEventFlagGrp,
(OS_FLAGS )0x1|0x2,
(OS_TICK )0,
(OS_OPT )OS_OPT_PEND_BLOCKING|OS_OPT_PEND_FLAG_SET_ANY,
(CPU_TS *)&ts,
(OS_ERR *)&os_err);
wh_fgs=OSFlagPendGetFlagsRdy(&os_err);
}
task2(){
OSFlagPost( (OS_FLAG_GRP *)&ADCSimEventFlagGrp,
(OS_FLAGS )0x1,
(OS_OPT )OS_OPT_POST_FLAG_SET,
(OS_ERR *)&err);
}
task3(){
OSFlagPost( (OS_FLAG_GRP *)&ADCSimEventFlagGrp,
(OS_FLAGS )0x2,
(OS_OPT )OS_OPT_POST_FLAG_SET,
(OS_ERR *)&err);
}
我的问题是,Task1里的wh_fgs的值,OSFlagPendGetFlagsRdy永远是0x3。为什么?
我的意思是,标志置位以后,一直不能清零?
|