void Events_SetBoolTimer( BOOL* TimerCompleteFlag, UINT32 MillisecondsFromNow ) { NATIVE_PROFILE_PAL_EVENTS(); // we assume only 1 can be active, abort previous just in case g_Events_BoolTimerCompletion.Abort(); if(TimerCompleteFlag) { g_Events_BoolTimerCompletion.InitializeForISR( local_Events_SetBoolTimer_Callback, TimerCompleteFlag ); g_Events_BoolTimerCompletion.EnqueueDelta( MillisecondsFromNow * 1000 ); } }
/* ******************************************************************** open the loop back driver interface. This routine opens a loop back device driver The address of this function must be placed into the "devices" table in iface.c either at compile time or before a device open is called. ******************************************************************** */ bool loop_lwip_open( struct netif *pNetIF ) { NATIVE_PROFILE_HAL_DRIVERS_ETHERNET(); /* Now put in a dummy ethernet address get the ethernet address */ memcpy( pNetIF->hwaddr, phony_addr, ETHARP_HWADDR_LEN ); #if defined(FAKE_ASYNC_LOOPBACK_PROCESSING) memset(&g_dummy_pbuf_chain,0,PBUF_CHAIN_DEPTH*sizeof(pbuf*)); g_fake_loopback_ISR.InitializeForISR( loop_lwip_send_packet, pNetIF ); #endif /* JJM Possibly initialize Continuation here. loop_lwip_interrupt_continuation */ return( TRUE ); }
BOOL TEvents::TEvents_1() { UINT32 count = 100; UINT32 signaled; HAL_COMPLETION compObj; compObj.InitializeForISR(CompletionCallback, NULL); while (count--) { compObj.EnqueueDelta(1000*2); signaled = Events_WaitForEvents(s_event,50); if (signaled != s_event) { return false; } } return true; }