【iCore4 双核心板_ARM】例程二十:LWIP_TCP_CLIENT实验——以太网数据传输

实验现象:

核心代码:

int main(void)
{    
    system_clock.initialize();                                                                                        //ϵͳʱÖÓ³õʼ»¯
    led.initialize();                                                       //LED³õʼ»¯
    adc.initialize();                                                     //ADC³õʼ»¯
    delay.initialize(216);                                                //ÑÓʱ³õʼ»¯
    my_malloc.initialize(SRAMIN);                                         //¶¯Ì¬ÄÚ´æ³õʼ»¯
    usart6.initialize(115200);                                                                                        //´®¿Ú²¨ÌØÉèÖÃ
    usart6.printf("33[1;32;40m");                                                   //ÉèÖÃ×ÖÌåÖÕ¶ËΪÂÌÉ«
    usart6.printf("
Hello, I am iCore4!

");                                            //´®¿ÚÐÅÏ¢Êä³ö 

    OSInit();                                                                       //UCOS³õʼ»¯
    
    while(lwip.initialize())                                                 //lwip³õʼ»¯
    {
     LED_RED_ON;
         usart6.printf("
ETH initialize error!

");                                //ETH³õʼ»¯Ê§°Ü
    }
  tcp_client.initialize();                                                    

    OSTaskCreate(start_task,(void*)0,(OS_STK*)&START_TASK_STK[START_STK_SIZE-1],START_TASK_PRIO);
    OSStart();                                                            //¿ªÆôUCOS    
}

源代码下载链接:

链接: https://pan.baidu.com/s/1qYRxI48 密码: zf9u

iCore4链接:

原文地址:https://www.cnblogs.com/xiaomagee/p/7566699.html