久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费
標(biāo)題:
STM32以太網(wǎng)lwip服務(wù)器實(shí)現(xiàn)程序
[打印本頁(yè)]
作者:
matthewroy
時(shí)間:
2019-7-2 10:16
標(biāo)題:
STM32以太網(wǎng)lwip服務(wù)器實(shí)現(xiàn)程序
更具lwip移植到stm32上實(shí)現(xiàn)以太網(wǎng)服務(wù)器
單片機(jī)源程序如下:
#include "led.h"
#include "lcd.h"
#include "key.h"
#include "stm32f4x7_eth.h"
#include "stm32f4x7_eth_bsp.h"
#include "netconf.h"
#include "tcp.h"
#include "udp.h"
#include "string.h"
#include "TCP_SERVER.h"
#define SYSTEMTICK_PERIOD_MS 10
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
__IO uint32_t LocalTime = 0; /* this variable is used to create a time reference incremented by 10ms */
uint32_t timingdelay;
int main(void)
{
NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);//設(shè)置系統(tǒng)中斷優(yōu)先級(jí)分組2
delay_init(); //初始化延時(shí)函數(shù)
LED_Init(); //初始化LED
//LCD_Init(); //初始化LCD
KEY_Init(); //初始化KEY
// BRUSH_COLOR=RED;
// LCD_DisplayString(10,10,24,"Illuminati STM32F4");
// LCD_DisplayString(10,40,16,"Author:Clever");
// LCD_DisplayString(20,70,24,"23 TCP_Server ");
//
// BRUSH_COLOR=BLUE;
// LCD_DisplayString(20,110,16,"IMT407G_IP:192.168.1.240"); //開(kāi)發(fā)板作為服務(wù)器時(shí)的IP
// LCD_DisplayString(20,130,16,"TCP_Server_PORT:2040 "); //開(kāi)發(fā)板作為服務(wù)器時(shí)的端口號(hào)
ETH_BSP_Config(); //DP83848相關(guān)IO初始化與ETH相關(guān)初始化
LwIP_Init(); //LWIP初始化
TCP_server_init(); //初始化開(kāi)發(fā)板為服務(wù)器
while (1)
{
LwIP_Periodic_Handle(LocalTime); /* handle periodic timers for LwIP */
}
}
/**
* @brief Inserts a delay time.
* @param nCount: number of 10ms periods to wait for.
* @retval None
*/
void Delay(uint32_t nCount)
{
/* Capture the current local time */
timingdelay = LocalTime + nCount;
/* wait until the desired delay finish */
while(timingdelay > LocalTime)
{
}
}
/**
* @brief Updates the system local time
* @param None
* @retval None
*/
void Time_Update(void)
{
LocalTime += SYSTEMTICK_PERIOD_MS;
}
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t* file, uint32_t line)
{
/* User can add his own implementation to report the file name and line number,
ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
/* Infinite loop */
while (1)
{}
}
#endif
復(fù)制代碼
所有資料51hei提供下載:
TCP服務(wù)器數(shù)據(jù)收發(fā)實(shí)驗(yàn).7z
(613.2 KB, 下載次數(shù): 44)
2019-7-2 16:19 上傳
點(diǎn)擊文件名下載附件
下載積分: 黑幣 -5
作者:
daichenghe
時(shí)間:
2019-7-30 09:10
為什么PC無(wú)法連接上。
歡迎光臨 (http://www.zg4o1577.cn/bbs/)
Powered by Discuz! X3.1
主站蜘蛛池模板:
国产精品资源在线
|
欧美激情在线精品一区二区三区
|
一级毛片在线播放
|
成人在线播放网址
|
精品免费国产视频
|
一区二区三区精品在线
|
国产成人在线免费
|
81精品国产乱码久久久久久
|
久久国产欧美日韩精品
|
国产欧美一区二区三区日本久久久
|
国产美女特级嫩嫩嫩bbb片
|
国产极品91
|
一级免费毛片
|
日本精品在线播放
|
天天玩夜夜操
|
国产区精品视频
|
阿v视频在线观看
|
亚洲日韩视频
|
亚洲精品一区二区三区蜜桃久
|
久久精品久久久
|
免费观看一区二区三区毛片
|
成年女人免费v片
|
国产精品日韩欧美一区二区三区
|
欧洲尺码日本国产精品
|
欧美在线播放一区
|
欧美国产精品一区二区
|
亚洲欧美中文日韩在线v日本
|
国产免费一区二区三区
|
中文字幕久久精品
|
欧美一区在线看
|
天堂中文在线播放
|
精品在线一区
|
欧美日韩一区二区在线播放
|
九色视频网站
|
成人精品国产一区二区4080
|
成人一区二区三区在线
|
国产成人精品免费视频大全最热
|
网站黄色在线免费观看
|
国产精品一区在线观看你懂的
|
欧美激情综合
|
91在线精品视频
|