示例#1
0
文件: ard_spi.c 项目: 4bcat/Arduino
void showTTCPstatus()
{
	printk("IF   status: %s\n", (ifStatus) ? "UP":"DOWN");
	printk("CONN status: %s\n", (_connected) ? "UP":"DOWN");

	int i = 0;
	for (; i<MAX_SOCK_NUM; i++)
	{
		void* p = getTTCP(i);
		if (p)
		{
			ttcp_t* _ttcp = (ttcp_t* )p;
			printk("Socket n.:%d addr:0x%x port:%d\n", i, _ttcp->addr, _ttcp->port);
			if (_ttcp->tpcb){
				printk("[tpcp-%p]-Status:%d\n", _ttcp->tpcb, _ttcp->tpcb->state);
			}
			if (_ttcp->lpcb){
				printk("[tlcp-%p]-Status:%d\n", _ttcp->lpcb, _ttcp->lpcb->state);
			}
			ard_tcp_print_stats(_ttcp);
		}
	}

	tcp_debug_print_pcbs();
}
示例#2
0
/*-----------------------------------------------------------------------------------*/
static void
tcp_timeout(void *data)
{
#if TCP_DEBUG
  tcp_debug_print_pcbs();
#endif /* TCP_DEBUG */
  sys_timeout(5000, tcp_timeout, NULL);
}
示例#3
0
static void
tcp_debug_timeout(void *data)
{
	LWIP_UNUSED_ARG(data);
#if TCP_DEBUG
	tcp_debug_print_pcbs();
#endif /* TCP_DEBUG */
	sys_timeout(5000, tcp_debug_timeout, NULL);
}
示例#4
0
STATIC mp_obj_t lwip_print_pcbs() {
    tcp_debug_print_pcbs();
    return mp_const_none;
}