标题:
stm32+w5500 HTTP_Server源程序
[打印本页]
作者:
wuzhongkai68
时间:
2022-1-7 11:42
标题:
stm32+w5500 HTTP_Server源程序
stm32 +w5500 web 服务
单片机源程序如下:
#include "stm32f10x.h"
#include "usart.h"
#include "config.h"
#include "device.h"
#include "spi2.h"
#include "socket.h"
#include "w5500.h"
#include "ult.h"
#include "httpult.h"
#include "flash.h"
#include <stdio.h>
#include <string.h>
uint8 reboot_flag = 0;
int main(void)
{
Systick_Init(72);
GPIO_Configuration(); //GPIO configuration
USART1_Init(); //115200@8-n-1
printf("W5500 EVB initialization over.\r\n");
Reset_W5500();
WIZ_SPI_Init();
printf("W5500 initialized!\r\n");
if(GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_7))
{
DefaultSet();//出厂值
}
else
{
get_config();//read config data from flash
}
printf("Firmware ver%d.%d\r\n",ConfigMsg.sw_ver[0],ConfigMsg.sw_ver[1]);
if(ConfigMsg.debug==0) ConfigMsg.debug=1;
set_network();
printf("Network is ready.\r\n");
while(1)
{
if(ConfigMsg.JTXD_Control == 0)
do_http();
else
JTXD_do_http();
if(reboot_flag)
NVIC_SystemReset();
// reboot();
}
}
复制代码
Keil代码下载:
HTTP_Server-Two_Page.7z
(232.97 KB, 下载次数: 49)
2022-1-8 01:19 上传
点击文件名下载附件
下载积分: 黑币 -5
欢迎光临 (http://www.51hei.com/bbs/)
Powered by Discuz! X3.1