实验现象:
核心代码:
int main(void)
{
system_clock.initialize(); //ϵͳʱÖÓ³õʼ»¯
led.initialize(); //LED³õʼ»¯
adc.initialize(); //ADC³õʼ»¯
delay.initialize(); //ÑÓʱ³õʼ»¯
my_malloc.initialize(SRAMIN); //¶¯Ì¬ÄÚ´æ³õʼ»¯
usart6.initialize(); //´®¿Ú²¨ÌØÉèÖÃ
usart6.printf("\033[1;32;40m"); //ÉèÖÃ×ÖÌåÖÕ¶ËΪÂÌÉ«
usart6.printf("\r\nHello, I am iCore4!\r\n\r\n"); //´®¿ÚÐÅÏ¢Êä³ö OSInit(); //UCOS³õʼ»¯ while(lwip.initialize()) //lwip³õʼ»¯
{
LED_RED_ON;
usart6.printf("\r\nETH initialize error!\r\n\r\n"); //ETH³õʼ»¯Ê§°Ü
}
tcp_client.initialize(); OSTaskCreate(start_task,(void*),(OS_STK*)&START_TASK_STK[START_STK_SIZE-],START_TASK_PRIO);
OSStart(); //¿ªÆôUCOS
}
源代码下载链接:
链接: https://pan.baidu.com/s/1qYRxI48 密码: zf9u
iCore4链接: