虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

GET-next

  • LWIP的底层结构

    Lwip协议栈的实现目的,无非是要上层用来实现app的socket编程。好,我们就从socket开始。为了兼容性,lwip的socket应该也是提供标准的socket接口函数,恩,没错,在src\inc lude\lwip\socket.h文件中可以看到下面的宏定义:#if LWIP COMPAT SOCKETS#define accept(a,b,c)Iwip accept(a,b,c)#define bind(a,b,c)Iwip bind(a,b,c)#define shutdown(a,b)Iwip shutdown(a,b)#define closesocket(s)Iwip close(s)好,这个结构先不管它,接着看下get socket函数的实现【也是在src\api\socket.c文件中】,在这里我们看到这样一条语句sock =&sockets[s];很明显,返回值也是这个sock它是根据传进来的序列号在sockets数组中找到对应的元素并返回该元素的地址。好了,那么这个sockets数组是在哪里被赋值了这些元素的呢?进行到这里似乎应该从标准的socket编程的开始,也就是socket函数讲起,那我们就顺便看一下。它对应的实际实现是下面这个函数Int Iwip socket(int domain,int type,int protocol)【src\api\socket.c】这个函数根据不同的协议类型,也就是函数中的type参数,创建了一个netconn结构体的指针,接着就是用这个指针作为参数调用了alloc socket函数,下面具体看下这个函数的实现

    标签: lwip 底层结构

    上传时间: 2022-06-19

    上传用户:aben

  • STM32CubeMX使用说明.

    安装软件到ST的网站上下载最新版本的STM32CubeMX 软件:编写这份文档的时候最新版本是V4.17.0 将下载后的压缩包解压,双击里面的SetupSTM32CubeMX-4.17.0.exe 文件来安装软件, 出现下图的界面的时候按Next 按钮继续:在下面的窗口中选择“ I accept the terms of this license agreement ”然后继续按Next 按钮。2下一个出现的窗口是选择软件安装的路径, 默认安装路径是C:\Program Files(x86)\STMicroelectronics\STM32Cube\STM32CubeMX ,可以根据实际需要选择别的路径,本次安装在D 盘相同的路径上。按Next 按钮后弹出一个确认窗口,按确定键确定。接着弹出下图的配置窗口,按原来默认的配置,按Next 键继续。3安装完后,按Next 键继续。按Done 键关闭下面的窗口,完成所有的安装。4安装固件包点击桌面上的STM32CubeMX 图标运行软件。先修改软件包的安装路径,点击help 菜单选“ Updater Settings”选项。软件包默认安装在C:/Users/XIN/STM32Cube/Repository/ 目录下,STM32Cube 软件包比较大可以点击Browse 按键修改安装的路径。修改完软件包的安装路径后开始安装 STM32Cube软件包,点击 help 菜单选 “Insta lnl ewsoftware and/or firmware packages ”选项。

    标签: stm32cubemx

    上传时间: 2022-06-19

    上传用户:jason_vip1

  • spi协议英文详解

    In this presentation, we will look at what the Serial Peripheral Interface, otherwise known as the SPI, is. and how it is used to communicate data to and from the PICmicro microcontroller.SPl is frequently used when few 1/O lines are available, but communication between two or more devices must be fast and easy to implement.In this presentation, we will discuss the following topics: We will first cover an Overview of SPI This section of the tutorial will introduce you to SPI and its concepts.Next, we will examine the use of SPI on the PICmicro MCU.The details of how SPI is implemented on a PICmicro device will be examined.Then, a Code Walkthrough will be given.The walkthough will explore code for both an SPI Master and SPI Slave. The example will have the Master generate data for sending to the slave.Finally, there will be a few resources given at the end of the presentation. These resources will allow you to explore in more detail the SPI interface

    标签: spi协议

    上传时间: 2022-06-20

    上传用户:

  • OpenWRT编译与其Makefile

    简介QpenWrt是一个基于Linux的开源嵌入式操作系统,其在linux上进行深入的定制,加入大量网络应用和管理界面,使其广泛应用于路由器中。我们的项目是基于QpenWrt开发的,故其系统框架是相同的。二、OpenWrt编译编译流程a)安装Linux系统)安装编译所需的各种工具;通过Subversion版本库获得源代码;更新并安装package feeds:创建一个默认配置以检查编译环境是否搭建好了;)用menuconfig来配置要加入固件中的软件包;)最后开始编译固件和清理工作。a)首先要安装一个Linux系统,建议使用Ubuntu(以下以Ubuntu为例),安装教程,可看官方wiki:http://wiki.ubuntu.orq.cn/%E9%A6%06%%A1%B5b)需安装如下工具:·升级Ubuntu软件包sudo apt-get update安装所需的工具

    标签: openwrt makefile

    上传时间: 2022-06-20

    上传用户:zhanglei193

  • S32K148 T-BOX快速入门

    S32K148 T-BOX快速入门CONTENTS: Get to know the S32K148 T-BOX Reference Design Board (RDB) S32K148 T-BOX RDB out-of-the-box setup Creating a new S32DS project for the S32K1xx MCU S32DS debugging basics Create a P&E debug configuration

    标签: s32k148 入门

    上传时间: 2022-06-20

    上传用户:jiabin

  • STM32F4 DSP and standard peripherals library 标准库

    STM32F4 DSP and standard peripherals library,由于网站的50M大小设置,所以把标准库配套的说明给删除了,若有需要请去st官网下载https://www.st.com/content/st_com/zh/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32-standard-peripheral-libraries/stsw-stm32065.html#get-software。 STSW-STM32065 V1.8.0版本,除了电子说明书/help文档,其他都有。

    标签: stm32f4 dsp

    上传时间: 2022-06-22

    上传用户:qdxqdxqdxqdx

  • linux编译OpenWRT固件教程

    并不是每个人都需要编译固件,笔者更推荐你直接使用官方固件,如果需要相应的软件,可以直接通过opkg 安装。为满足更多人需求,这里提供一个傻瓜教程,照着走一次,就编译好了,转的别问我为什么⋯⋯⋯⋯1.根据你的系统安装相应的包,把以下命令复制粘贴运行一次就行。Ubuntu 32bitsudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawkflex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzipUbuntu 64bitsudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev gawk gccmultilibflex git-core gettextArch Linuxpacman -S --needed subversion asciidoc bash bc binutils bzip2 fastjar flex git gcc util-linuxgawk intltool zlib make cdrkit ncurses openssl patch perl-extutils-makemaker rsync sdcc unzipwget gettext libxslt boost libusb bin86 sharutils b43-fwcutter findutilsDebian 6 Squeezeapt-get install libncurses5-dev zlib1g-dev gawk flex libssl-dev sdcc-nfDebian 7 Wheezy

    标签: linux openwrt

    上传时间: 2022-06-23

    上传用户:bluedrops

  • STM32驱动舵机

    1.1首先安装J-Link驱动>开发软件\Setup_JLinkARM_V468,双击要安装的“Setup JLinkARMV468.exe",>安装过程全选“next”直到安装成功,>将JLINK插接到电脑的USB口,即可在我的电脑\管理\设备管理器\通用串行总线控制器中看到一个J-Link driver。舵机是一种位置(角度)伺服的驱动器,适用于需要角度不断变化并可以保持的控制系统。舵机是一种俗称,其实是一种伺服马达。控制信号由接收机的通道进入信号调制芯片,获得直流偏置电压。内部有一个基准电路,产生周期为20ms,宽度为1.5ms的基准信号,将获得的直流偏置电压与电位器的电压比较,获得电压差输出。电压差的正负输出到电机驱动芯片决定电机的正反转。当电机转速一定时,通过级联减速齿轮带动电位器旋转,使得电压差为0,电机停止转动。

    标签: stm32 驱动

    上传时间: 2022-07-05

    上传用户:

  • GD32F103数据手册(英文)

    The GD32F103xx device is a 32-bit general-purpose microcontroller based on the ARM?Cortex?-M3 RISC core with best ratio in terms of processing power, reduced power consumption and peripheral set. The Cortex?-M3 is a next generation processor core whichis tightly coupled with a Nested Vectored Interrupt Controller (NVIC), SysTick timer and advanced debug support.The GD32F103xx device incorporates the ARM ' Cortex?-M3 32-bit processor core operating at 108 MHz frequency with Flash accesses zero wait states to obtain maximumefficiency. It provides up to 3 MB on-chip Flash memory and up to 96 KB SRAM memory. An extensive range of enhanced I/Os and peripherals connected to two APB buses. The devices offer up to three 12-bit ADCs, up to two 12-bit DACs, up to ten general-purpose

    标签: gd32f103

    上传时间: 2022-07-23

    上传用户:aben

  • GD32 Keil5工程创建步骤

    第一步:安装DFP软件包(1)按照Keil uVision5,步骤略。我的keil版本如下:uVision V5.21.1.0Copyright(C)2016 ARM Ltd and ARM Germany GmbH. All rights reserved.(2)下载GD3210X的DFP软件包。下载地址:(3)安装DFP软件包。双击pack文件进行安装,如下图所示:点击next,将包文件复制到上面的路径位置。如下图:GigaDevice文件夹就是安装好的软件包。第二步:创建Keil工程(1)通常要新建3个文件夹。如下图所示:(2)打开keil5,新建project.将工程文件放到Mdk-Arm目录下面。弹出器件选择界面:在Device 下拉框,选择Software Packs,选择GD32F103RB点击OK

    标签: gd32 keil

    上传时间: 2022-07-23

    上传用户: