本文整理汇总了C++中HAL_COMPLETION::Execute方法的典型用法代码示例。如果您正苦于以下问题:C++ HAL_COMPLETION::Execute方法的具体用法?C++ HAL_COMPLETION::Execute怎么用?C++ HAL_COMPLETION::Execute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HAL_COMPLETION
的用法示例。
在下文中一共展示了HAL_COMPLETION::Execute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DequeueAndExec
void HAL_COMPLETION::DequeueAndExec()
{
NATIVE_PROFILE_PAL_ASYNC_PROC_CALL();
GLOBAL_LOCK(irq);
HAL_COMPLETION* ptr = (HAL_COMPLETION*)g_HAL_Completion_List.FirstNode();
HAL_COMPLETION* ptrNext = (HAL_COMPLETION*)ptr->Next();
// waitforevents does not have an associated completion, therefore we need to verify
// than their is a next completion and that the current one has expired.
if(ptrNext)
{
ASSERT(ptr->EventTimeTicks <= HAL_Time_CurrentTicks());
Events_Set(SYSTEM_EVENT_FLAG_SYSTEM_TIMER);
ptr->Unlink();
//
// In case there's no other request to serve, set the next interrupt to be 356 years since last powerup (@25kHz).
//
HAL_Time_SetCompare( ptrNext->Next() ? ptrNext->EventTimeTicks : HAL_Completion_IdleValue );
#if defined(_DEBUG)
ptr->EventTimeTicks = 0;
#endif // defined(_DEBUG)
// let the ISR turn on interrupts, if it needs to
ptr->Execute();
}
}