找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 1442|回复: 0
收起左侧

stm32+w5500 HTTP_Server源程序

[复制链接]
ID:1000504 发表于 2022-1-7 11:42 | 显示全部楼层 |阅读模式
stm32 +w5500 web 服务

单片机源程序如下:
  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();//出厂值
  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. }
复制代码

Keil代码下载:
HTTP_Server-Two_Page.7z (232.97 KB, 下载次数: 42)

评分

参与人数 1黑币 +10 收起 理由
admin + 10 共享资料的黑币奖励!

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表