资源简介
ENC28j60模块网络通信 实现了局域网间的通信,通过浏览器可直接与板子通信实现了远程控制。
代码片段和文件信息
/**
* @file
* Sequential API External module
*
*/
/*
* Copyright (c) 2001-2004 Swedish Institute of Computer Science.
* All rights reserved.
*
* Redistribution and use in source and binary forms with or without modification
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ‘‘AS IS‘‘ AND ANY EXPRESS OR IMPLIED
* WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
* SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL
* EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO PROCUREMENT
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE DATA OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY WHETHER IN
* CONTRACT STRICT LIABILITY OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE EVEN IF ADVISED OF THE POSSIBILITY
* OF SUCH DAMAGE.
*
* This file is part of the lwIP TCP/IP stack.
*
* Author: Adam Dunkels
*
*/
/* This is the part of the API that is linked with
the application */
#include “lwip/opt.h“
#if LWIP_NETCONN /* don‘t build if not configured for use in lwipopts.h */
#include “lwip/api.h“
#include “lwip/tcpip.h“
#include “lwip/memp.h“
#include “lwip/ip.h“
#include “lwip/raw.h“
#include “lwip/udp.h“
#include “lwip/tcp.h“
#include
/**
* Create a new netconn (of a specific type) that has a callback function.
* The corresponding pcb is also created.
*
* @param t the type of ‘connection‘ to create (@see enum netconn_type)
* @param proto the IP protocol for RAW IP pcbs
* @param callback a function to call on status changes (RX available TX‘ed)
* @return a newly allocated struct netconn or
* NULL on memory error
*/
struct netconn*
netconn_new_with_proto_and_callback(enum netconn_type t u8_t proto netconn_callback callback)
{
struct netconn *conn;
struct api_msg msg;
conn = netconn_alloc(t callback);
if (conn != NULL ) {
msg.function = do_newconn;
msg.msg.msg.n.proto = proto;
msg.msg.conn = conn;
TCPIP_APIMSG(&msg);
if (conn->err != ERR_OK) {
LWIP_ASSERT(“freeing conn without freeing pcb“ conn->pcb.tcp == NULL);
LWIP_ASSERT(“conn has no op_completed“ conn->op_completed != SYS_SEM_NULL);
LWIP_ASSERT(“conn has no recvmbox“ conn->rec
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1845839 2012-07-20 23:33 enc28j60+lwip\datasheet\ENC28J60 Stand-Alone Ethernet Controller with SPI Interface (Chinese).pdf
文件 1669587 2009-07-02 07:30 enc28j60+lwip\datasheet\ENC28J60.pdf
文件 313073 2011-07-13 05:02 enc28j60+lwip\datasheet\HR911105.pdf
文件 1640252 2012-07-31 19:32 enc28j60+lwip\LWIP协议栈原文件\contrib-1.3.0_.zip
....... 101766 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\CHANGELOG
....... 1611 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\COPYING
....... 3372 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\doc\contrib.txt
....... 407 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\doc\FILES
....... 19025 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\doc\rawapi.txt
....... 4701 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\doc\savannah.txt
....... 6360 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\doc\snmp_agent.txt
....... 9624 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\doc\sys_arch.txt
....... 142 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\FILES
....... 3312 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\README
....... 16435 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\src\api\api_lib.c
....... 34330 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\src\api\api_msg.c
....... 2914 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\src\api\err.c
....... 6724 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\src\api\netbuf.c
....... 11038 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\src\api\netdb.c
....... 4973 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\src\api\netifapi.c
....... 56895 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\src\api\sockets.c
....... 15705 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\src\api\tcpip.c
....... 62408 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\src\core\dhcp.c
....... 30506 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\src\core\dns.c
....... 11328 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\src\core\init.c
....... 16301 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\src\core\ipv4\autoip.c
....... 11079 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\src\core\ipv4\icmp.c
....... 25450 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\src\core\ipv4\igmp.c
....... 7187 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\src\core\ipv4\inet.c
....... 12850 2009-12-24 23:38 enc28j60+lwip\LWIP协议栈原文件\lwip-1.3.2\src\core\ipv4\inet_chksum.c
............此处省略658个文件信息
相关资源
- stm32f103上实现的一个fft算法
- STM32的无线图像采集传输系统的硬件设
- stm32移植uCOSii,内含移植步骤和代码
- 基于stm32的蓝牙密码锁
- stm32F407从flash上播放mp3 flash是W25Q128
- STM32定时器捕获脉冲宽度
- STM32F429操作两片AD7689
- stm32陀螺仪,颜色识别抓球小车.zip
- STM32F103C8T6+FreeRTOS+Keil5 代码亲测完美
- STM32单片机最小原理图+PCB
- STM32L431RC裸机移植RTT完整工程代码.r
- STM32实验RGB彩灯控制.zip
- STM32F4xx_W25Q128_20200619_FLM项目.rar
- FreeRTOS和FreeMODBUS移植到STM32F407傻瓜教
- 基于OV5640摄像头二维码识别例程
- ATSHA204A数据手册(有中文注释)+stm
- stm32通过串口更新字库
- ADS1115的STM32F407的驱动
- STM32f10x使用L298N驱动电机程序模板直接
- 2018年吉林省电子设计竞赛智能物流车
- STM32F429内部FLASH读写保护测试程序
- 12864LCD_STM32
- OLED原理图、说明、程序51、stm32、Ar
- STM32F4读取ADS1262数据外部压力传感器
- ESP8266和stm32之四实现LCD联网
- 程控音频放大器+FFT频谱显示
- 基于stm32智能手环.zip
- modbus-主机-stm32移植源码与调试工具
- PS2手柄的STM32应用
- STM32驱动WS2812
评论
共有 条评论