本文整理汇总了C++中HAL_CONTINUATION类的典型用法代码示例。如果您正苦于以下问题:C++ HAL_CONTINUATION类的具体用法?C++ HAL_CONTINUATION怎么用?C++ HAL_CONTINUATION使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了HAL_CONTINUATION类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: NATIVE_PROFILE_PAL_ASYNC_PROC_CALL
void HAL_COMPLETION::Execute()
{
NATIVE_PROFILE_PAL_ASYNC_PROC_CALL();
ASSERT_IRQ_MUST_BE_OFF();
#if defined(_DEBUG)
this->Start_RTC_Ticks = 0;
#endif
if(this->ExecuteInISR)
{
HAL_CONTINUATION* cont = this;
cont->Execute();
}
else
{
this->Enqueue();
}
}
示例2: lwip_interrupt_continuation
void lwip_interrupt_continuation( void )
{
NATIVE_PROFILE_PAL_NETWORK();
GLOBAL_LOCK(irq);
if(!InterruptTaskContinuation.IsLinked())
{
InterruptTaskContinuation.Enqueue();
}
}
示例3: rtp_thread_spawn
/*----------------------------------------------------------------------*
rtp_thread_spawn
*----------------------------------------------------------------------*/
int rtp_thread_spawn (RTP_HANDLE * newThread,
RTP_ENTRY_POINT_FN entryPoint,
const char * name,
int stackSizeIndex,
int priorityIndex,
void * userData)
{
PIFACE pi;
int * index = (int *) userData;
if ((rtp_strcmp(name, "ip interpret") == 0) && !IPTaskInitialized[*index])
{
IPTaskInitialized[*index] = 1;
IPTaskContinuation[*index].InitializeCallback((HAL_CALLBACK_FPN) entryPoint, userData);
}
else if ((rtp_strcmp(name, "timer comp") == 0) && !TimerTaskCompInitialized)
{
TimerTaskCompInitialized = 1;
TimerTaskCompletion.InitializeForUserMode((HAL_CALLBACK_FPN) entryPoint, userData);
TimerTaskCompletion.EnqueueDelta(cfg_protocol_data.timer_freq * 1000);
}
else if ((rtp_strcmp(name, "timer cont") == 0) && !TimerTaskContInitialized)
{
TimerTaskContInitialized = 1;
TimerTaskContinuation.InitializeCallback((HAL_CALLBACK_FPN) entryPoint,userData);
}
else if ((rtp_strcmp(name, "interrupt task") == 0) && !InterruptTaskContInitialized[*index])
{
pi = (PIFACE) &ifaces[*index];
if (!pi)
{
return -1;
}
InterruptTaskContInitialized[*index] = 1;
InterruptTaskContinuation[*index].InitializeCallback((HAL_CALLBACK_FPN) entryPoint,pi);
}
else if ((rtp_strcmp(name, "dhcp") == 0) && !DHCPTaskInitialized)
{
DHCPTaskInitialized = 1;
DHCPTaskContinuation.InitializeCallback((HAL_CALLBACK_FPN) entryPoint,userData);
}
return (0);
}
示例4: Initialize
BOOL LWIP_SOCKETS_Driver::Initialize()
{
NATIVE_PROFILE_PAL_NETWORK();
PostAddressChangedContinuation.InitializeCallback(PostAddressChanged, NULL);
PostAvailabilityOnContinuation.InitializeCallback(PostAvailabilityOn, NULL);
PostAvailabilityOffContinuation.InitializeCallback(PostAvailabilityOff, NULL);
/* Initialize the lwIP stack */
tcpip_init(TcpipInitDone, NULL);
return TRUE;
}
示例5: Link_callback
void LWIP_SOCKETS_Driver::Link_callback(struct netif *netif)
{
if (netif_is_link_up(netif))
{
if (!PostAvailabilityOnContinuation.IsLinked())
PostAvailabilityOnContinuation.Enqueue();
}
else
{
if (!PostAvailabilityOffContinuation.IsLinked())
PostAvailabilityOffContinuation.Enqueue();
}
Events_Set(SYSTEM_EVENT_FLAG_SOCKET);
Events_Set(SYSTEM_EVENT_FLAG_NETWORK);
}
示例6: rtp_thrd_timer_completion
/*----------------------------------------------------------------------*
rtp_thrd_timer_completion
*----------------------------------------------------------------------*/
void rtp_thrd_timer_completion(void* arg)
{
NATIVE_PROFILE_PAL_NETWORK();
/* Schedule the timer task to run as a continuation */
if(!TimerTaskContinuation.IsLinked())
{
TimerTaskContinuation.Enqueue();
}
/////////////////////////////////////////////////////////////////
// DO NT CHANGE!
// KEEP the timeout IN SYNC with _CFG_TIMER_FREQ
TimerTaskCompletion.EnqueueDelta(cfg_protocol_data.timer_freq * 1000);
// DO NT CHANGE!
/////////////////////////////////////////////////////////////////
}
示例7: memset
BOOL ENC28J60_LWIP_Driver::Close( ENC28J60_LWIP_DRIVER_CONFIG* config, int index )
{
NATIVE_PROFILE_HAL_DRIVERS_ETHERNET();
if(config == NULL) return FALSE;
LwipUpTimeCompletion.Abort();
netif_set_link_down( &g_ENC28J60_NetIF );
netif_set_down( &g_ENC28J60_NetIF );
netif_remove( &g_ENC28J60_NetIF );
/* Disable the INTERRUPT pin */
CPU_GPIO_EnableInputPin2(config->INT_Pin,
FALSE, /* Glitch filter enable */
NULL, /* ISR */
0, /* minor number */
GPIO_INT_NONE, /* Interrupt edge */
RESISTOR_PULLUP); /* Resistor State */
InterruptTaskContinuation.Abort();
LwipNetworkStatus = FALSE;
enc28j60_lwip_close( &g_ENC28J60_NetIF );
memset(&g_ENC28J60_NetIF, 0, sizeof(g_ENC28J60_NetIF));
return TRUE;
}
示例8: InitContinuations
void InitContinuations( struct netif *pNetIf )
{
InterruptTaskContinuation.InitializeCallback( (HAL_CALLBACK_FPN)STM32F4_ETH_LWIP_recv, (void*)pNetIf );
LwipUpTimeCompletion.InitializeForUserMode( (HAL_CALLBACK_FPN)lwip_network_uptime_completion, (void*)pNetIf );
LwipUpTimeCompletion.EnqueueDelta64( 2000000 );
}
示例9: InitContinuations
void InitContinuations( struct netif *pNetIf )
{
InterruptTaskContinuation.InitializeCallback( (HAL_CALLBACK_FPN)LPC24XX_EMAC_lwip_recv, pNetIf );
LwipUpTimeCompletion.InitializeForUserMode( (HAL_CALLBACK_FPN)lwip_network_uptime_completion, pNetIf );
LwipUpTimeCompletion.EnqueueDelta64( 2000000 );
}
示例10: InitContinuations
void InitContinuations( struct netif* pNetIf )
{
InterruptTaskContinuation.InitializeCallback( (HAL_CALLBACK_FPN)enc28j60_lwip_interrupt, &g_ENC28J60_NetIF );
LwipUpTimeCompletion.InitializeForUserMode( (HAL_CALLBACK_FPN)lwip_network_uptime_completion, pNetIf );
LwipUpTimeCompletion.EnqueueDelta64( 500000 );
}
示例11: Uninitialize
BOOL LWIP_SOCKETS_Driver::Uninitialize()
{
NATIVE_PROFILE_PAL_NETWORK();
PostAddressChangedContinuation.Abort();
PostAvailabilityOnContinuation.Abort();
PostAvailabilityOffContinuation.Abort();
for(int i=0; i<g_NetworkConfig.NetworkInterfaceCount; i++)
{
Network_Interface_Close(i);
}
tcpip_shutdown();
return TRUE;
}
示例12: rtp_thread_kill
/*----------------------------------------------------------------------*
rtp_thread_kill
*----------------------------------------------------------------------*/
int rtp_thread_kill (RTP_HANDLE * newThread,
RTP_ENTRY_POINT_FN entryPoint,
const char * name,
int stackSizeIndex,
int priorityIndex,
void * userData)
{
int * index = (int *) userData;
if ((rtp_strcmp(name, "ip interpret") == 0) && IPTaskInitialized[*index])
{
IPTaskInitialized[*index] = 0;
IPTaskContinuation[*index].Abort();
}
else if ((rtp_strcmp(name, "timer comp") == 0) && TimerTaskCompInitialized)
{
TimerTaskCompInitialized = 0;
TimerTaskCompletion.Abort();
}
else if ((rtp_strcmp(name, "timer cont") == 0) && TimerTaskContInitialized)
{
TimerTaskContInitialized = 0;
TimerTaskContinuation.Abort();
}
else if ((rtp_strcmp(name, "interrupt task") == 0) && InterruptTaskContInitialized[*index])
{
InterruptTaskContInitialized[*index] = 0;
InterruptTaskContinuation[*index].Abort();
}
else if ((rtp_strcmp(name, "dhcp") == 0) && DHCPTaskInitialized)
{
DHCPTaskInitialized = 0;
DHCPTaskContinuation.Abort();
}
return (0);
}
示例13: Status_callback
void LWIP_SOCKETS_Driver::Status_callback(struct netif *netif)
{
if (!PostAddressChangedContinuation.IsLinked())
PostAddressChangedContinuation.Enqueue();
#if !defined(BUILD_RTM)
lcd_printf("\f\n\n\n\n\n\nLink Update: %s\n", (netif_is_up(netif) ? "UP " : "DOWN"));
lcd_printf(" IP: %d.%d.%d.%d\n", (netif->ip_addr.addr >> 0) & 0xFF,
(netif->ip_addr.addr >> 8) & 0xFF,
(netif->ip_addr.addr >> 16) & 0xFF,
(netif->ip_addr.addr >> 24) & 0xFF);
lcd_printf(" SM: %d.%d.%d.%d\n", (netif->netmask.addr >> 0) & 0xFF,
(netif->netmask.addr >> 8) & 0xFF,
(netif->netmask.addr >> 16) & 0xFF,
(netif->netmask.addr >> 24) & 0xFF);
lcd_printf(" GW: %d.%d.%d.%d\n", (netif->gw.addr >> 0) & 0xFF,
(netif->gw.addr >> 8) & 0xFF,
(netif->gw.addr >> 16) & 0xFF,
(netif->gw.addr >> 24) & 0xFF);
debug_printf("IP Address: %d.%d.%d.%d\n", (netif->ip_addr.addr >> 0) & 0xFF,
(netif->ip_addr.addr >> 8) & 0xFF,
(netif->ip_addr.addr >> 16) & 0xFF,
(netif->ip_addr.addr >> 24) & 0xFF);
#if LWIP_DNS
if (netif->flags & NETIF_FLAG_DHCP)
{
struct ip_addr dns1 = dns_getserver(0);
struct ip_addr dns2 = dns_getserver(1);
lcd_printf(" dns1: %d.%d.%d.%d\n", (dns1.addr >> 0) & 0xFF,
(dns1.addr >> 8) & 0xFF,
(dns1.addr >> 16) & 0xFF,
(dns1.addr >> 24) & 0xFF);
lcd_printf(" dns2: %d.%d.%d.%d\n", (dns2.addr >> 0) & 0xFF,
(dns2.addr >> 8) & 0xFF,
(dns2.addr >> 16) & 0xFF,
(dns2.addr >> 24) & 0xFF);
}
#endif
#endif
Events_Set(SYSTEM_EVENT_FLAG_SOCKET);
Events_Set(SYSTEM_EVENT_FLAG_NETWORK);
}
示例14: memset
BOOL AT91_EMAC_LWIP_Driver::Close(void)
{
LwipUpTimeCompletion.Abort();
CPU_INTC_DeactivateInterrupt(AT91C_ID_EMAC);
InterruptTaskContinuation.Abort();
LwipNetworkStatus = 0;
netif_set_down( &g_AT91_EMAC_NetIF );
netif_remove( &g_AT91_EMAC_NetIF );
AT91_EMAC_LWIP_close( &g_AT91_EMAC_NetIF );
memset( &g_AT91_EMAC_NetIF, 0, sizeof g_AT91_EMAC_NetIF );
return TRUE;
}
示例15: memset
BOOL SH7264_SMSC_LWIP_Driver::Close(void)
{
LwipUpTimeCompletion.Abort();
//CPU_INTC_DeactivateInterrupt(SH7264C_ID_EDMAC);
CPU_INTC_DeactivateInterrupt(81);
InterruptTaskContinuation.Abort();
LwipNetworkStatus = 0;
netif_set_down( &g_SH7264_SMSC_NetIF );
netif_remove( &g_SH7264_SMSC_NetIF );
SH7264_SMSC_lwip_close( &g_SH7264_SMSC_NetIF );
memset( &g_SH7264_SMSC_NetIF, 0, sizeof g_SH7264_SMSC_NetIF);
return TRUE;
}