找回密碼
 立即注冊(cè)

QQ登錄

只需一步,快速開(kāi)始

搜索
查看: 2354|回復(fù): 0
收起左側(cè)

stm32+w5500 HTTP_Server源程序

[復(fù)制鏈接]
ID:1000504 發(fā)表于 2022-1-7 11:42 | 顯示全部樓層 |閱讀模式
stm32 +w5500 web 服務(wù)

單片機(jī)源程序如下:
  1. #include "stm32f10x.h"
  2. #include "usart.h"
  3. #include "config.h"
  4. #include "device.h"
  5. #include "spi2.h"
  6. #include "socket.h"
  7. #include "w5500.h"
  8. #include "ult.h"
  9. #include "httpult.h"
  10. #include "flash.h"
  11. #include <stdio.h>
  12. #include <string.h>

  13. uint8 reboot_flag = 0;

  14. int main(void)
  15. {
  16.         Systick_Init(72);
  17.         GPIO_Configuration(); //GPIO configuration
  18.         USART1_Init(); //115200@8-n-1
  19.         printf("W5500 EVB initialization over.\r\n");
  20.         Reset_W5500();
  21.         WIZ_SPI_Init();
  22.         printf("W5500 initialized!\r\n");
  23.         if(GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_7))
  24.         {
  25.                 DefaultSet();//出廠(chǎng)值
  26.         }
  27.         else
  28.         {
  29.                 get_config();//read config data from flash
  30.         }
  31.         printf("Firmware ver%d.%d\r\n",ConfigMsg.sw_ver[0],ConfigMsg.sw_ver[1]);
  32.         if(ConfigMsg.debug==0) ConfigMsg.debug=1;

  33.         set_network();
  34.         printf("Network is ready.\r\n");
  35.         while(1)
  36.         {
  37.                 if(ConfigMsg.JTXD_Control == 0)
  38.                           do_http();
  39.                 else
  40.                           JTXD_do_http();
  41.                 if(reboot_flag)
  42.                         NVIC_SystemReset();
  43. //        reboot();
  44.         
  45.         }
  46. }
復(fù)制代碼

Keil代碼下載:
HTTP_Server-Two_Page.7z (232.97 KB, 下載次數(shù): 49)



評(píng)分

參與人數(shù) 1黑幣 +10 收起 理由
admin + 10 共享資料的黑幣獎(jiǎng)勵(lì)!

查看全部評(píng)分

回復(fù)

使用道具 舉報(bào)

本版積分規(guī)則

手機(jī)版|小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術(shù)交流QQ群281945664

Powered by 單片機(jī)教程網(wǎng)

快速回復(fù) 返回頂部 返回列表