动态
osEventFlagsId_t dynamicEventHandle;
const osEventFlagsAttr_t dynamicEvent_attributes = {
.name = "dynamicEvent"
};
void MX_FREERTOS_Init(void)
{
dynamicEventHandle = osEventFlagsNew(&dynamicEvent_attributes);
}
静态
typedef StaticEventGroup_t osStaticEventGroupDef_t;
osEventFlagsId_t staticEventHandle;
osStaticEventGroupDef_t staticEventControlBlock;
const osEventFlagsAttr_t staticEvent_attributes = {
.name = "staticEvent",
.cb_mem = &staticEventControlBlock,
.cb_size = sizeof(staticEventControlBlock),
};
void MX_FREERTOS_Init(void)
{
staticEventHandle = osEventFlagsNew(&staticEvent_attributes);
}