资源简介
这是关于esp8266自己开发SDK固件实现建立TCP、UDP服务器端的程序demo,参考这里的例程可以更快熟悉程序流程。

代码片段和文件信息
/*
* ESPRSSIF MIT License
*
* Copyright (c) 2016
*
* Permission is hereby granted for use on ESPRESSIF SYSTEMS ESP8266 only in which case
* it is free of charge to any person obtaining a copy of this software and associated
* documentation files (the “Software“) to deal in the Software without restriction including
* without limitation the rights to use copy modify merge publish distribute sublicense
* and/or sell copies of the Software and to permit persons to whom the Software is furnished
* to do so subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND EXPRESS OR
* IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER LIABILITY WHETHER
* IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING FROM OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
#include “../../TCP-UDP_server_app/include/driver/uart.h“
#include “ets_sys.h“
#include “osapi.h“
#include “osapi.h“
#include “driver/uart_register.h“
#include “mem.h“
#include “os_type.h“
// UartDev is defined and initialized in rom code.
extern UartDevice UartDev;
LOCAL struct UartBuffer* pTxBuffer = NULL;
LOCAL struct UartBuffer* pRxBuffer = NULL;
/*uart demo with a system task to output what uart receives*/
/*this is a example to process uart data from taskplease change the priority to fit your application task if exists*/
/*it might conflict with your task if soplease arrange the priority of different task or combine it to a different event in the same task. */
#define uart_recvTaskPrio 0
#define uart_recvTaskQueueLen 10
os_event_t uart_recvTaskQueue[uart_recvTaskQueueLen];
#define DBG
#define DBG1 uart1_sendStr_no_wait
#define DBG2 os_printf
LOCAL void uart0_rx_intr_handler(void *para);
/******************************************************************************
* FunctionName : uart_config
* Description : Internal used function
* UART0 used for data TX/RX RX buffer size is 0x100 interrupt enabled
* UART1 just used for debug output
* Parameters : uart_no use UART0 or UART1 defined ahead
* Returns : NONE
*******************************************************************************/
LOCAL void ICACHE_FLASH_ATTR
uart_config(uint8 uart_no)
{
if (uart_no == UART1){
PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO2_U FUNC_U1TXD_BK);
}else{
/* rcv_buff size if 0x100 */
ETS_UART_INTR_ATTACH(uart0_rx_intr_handler &(UartDev.rcv_buff));
PIN_PULLUP_DIS(PERIPHS_IO_MUX_U0TXD_U);
PIN_FUNC_SELECT(PERIPHS_IO_MUX_U0TXD_U FUNC_U
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-06-01 14:06 esp8266的SDK开发 TCP、UDP服务器端\
目录 0 2018-06-01 14:06 esp8266的SDK开发 TCP、UDP服务器端\driver\
文件 1446 2018-05-14 16:51 esp8266的SDK开发 TCP、UDP服务器端\driver\Makefile
文件 28042 2018-05-14 16:51 esp8266的SDK开发 TCP、UDP服务器端\driver\uart.c
文件 3080 2018-05-14 16:51 esp8266的SDK开发 TCP、UDP服务器端\gen_misc.bat
文件 3276 2018-05-14 16:51 esp8266的SDK开发 TCP、UDP服务器端\gen_misc.sh
目录 0 2018-06-01 14:06 esp8266的SDK开发 TCP、UDP服务器端\include\
目录 0 2018-06-01 14:06 esp8266的SDK开发 TCP、UDP服务器端\include\driver\
文件 6850 2018-05-14 16:51 esp8266的SDK开发 TCP、UDP服务器端\include\driver\uart.h
文件 7546 2018-05-14 16:51 esp8266的SDK开发 TCP、UDP服务器端\include\driver\uart_register.h
目录 0 2018-06-01 14:06 esp8266的SDK开发 TCP、UDP服务器端\include\ssl\
文件 3726 2018-05-14 16:51 esp8266的SDK开发 TCP、UDP服务器端\include\ssl\cert.h
文件 3282 2018-05-14 16:51 esp8266的SDK开发 TCP、UDP服务器端\include\ssl\private_key.h
文件 248 2018-05-14 16:51 esp8266的SDK开发 TCP、UDP服务器端\include\tcp_server.h
文件 240 2018-05-14 16:51 esp8266的SDK开发 TCP、UDP服务器端\include\udp_server.h
文件 1376 2018-05-14 16:51 esp8266的SDK开发 TCP、UDP服务器端\include\user_config.h
文件 2846 2018-05-14 16:51 esp8266的SDK开发 TCP、UDP服务器端\Makefile
文件 71 2018-05-14 16:51 esp8266的SDK开发 TCP、UDP服务器端\README.md
目录 0 2018-06-01 14:06 esp8266的SDK开发 TCP、UDP服务器端\user\
文件 1477 2018-05-14 16:51 esp8266的SDK开发 TCP、UDP服务器端\user\Makefile
文件 2191 2018-05-14 16:51 esp8266的SDK开发 TCP、UDP服务器端\user\tcp_server.c
文件 1980 2018-05-14 16:51 esp8266的SDK开发 TCP、UDP服务器端\user\udp_server.c
文件 3551 2018-05-14 16:51 esp8266的SDK开发 TCP、UDP服务器端\user\user_main.c
相关资源
- TCP IP通信labview程序
- Modbus协议官方文档中、英文全
- Omron ETN21模块进行modbustcp通讯
- 使用选择性重传协议实现UDP可靠通信
- 组态王中S7-300TCP驱动
- 基于Apache Mina实现的TCP长连接和短连接
- CVI下的TCP服务器和客户端
- 代码客:G-TcpServer(IOCP) 1.0 正式版及
- 网络(UDP)转串口程序
- TCP 发包工具(windows)
- 用Socket写的简易FTP服务器和客户端
- VxWorks TCPIP协议栈
- socket小工具(可方便建立TCP UDP的soc
- UDP组播的发送和接收程序
- vc 编写的基于TCP协议的客户/服务器
- 基于CSocket的多人聊天室
- 采用WINSOCK2 编写的TCP/UDP通信程序
- Modbus TCP Client
- 易语言 TCP使用HTTP、SOCKES5代理IP。
- 西门子S7-1200 MODBUS-TCP通讯编程
- 200SMART Modbus-TCP通信程序演示-轮询(多
- TCP_UDP对结构体加密数据传输
- 基于PIC的TCP/IP网络协议和zigbee无线传
- 欧姆龙PLC tcp通信工具
- 欧姆龙以太网通讯TCP/UDP及欧姆龙PLC程
- 流媒体相关协议标准RTP/RTSP/RTCP PDF文档
- 航海模拟器中DCPA TCPA的算法
- UDP协议进行P2P打洞
- esp8266 win10驱动 cp2102
- TCPMP 支持ce6.0的播放器
评论
共有 条评论