FT2232调试记录(3)

FT2232调试记录(1):
FT2232调试记录(2):
FT2232调试记录(3):

FT2232 SPI读写函数:

参照SPI提供的文档:
在这里插入图片描述

工程:在这里插入图片描述

SPI 写函数:

FT_STATUS write_byte(FT_HANDLE handle,uint8_t address, uint16_t data)
{
uint32_t sizeToTransfer = 0;
uint32_t sizeTransfered=0;
//bool writeComplete=0;
//uint32_t retry=0;
//bool state;
FT_STATUS status;
/* Write command EWEN(with CS_High -> CS_Low) */
sizeToTransfer=11;
sizeTransfered=0;
byOutputBuffer[0]=0x9F;/* SPI_EWEN -> binary 10011xxxxxx (11bits) */
byOutputBuffer[1]=0xFF;
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);

/* CS_High + Write command + Address */
sizeToTransfer=1;
sizeTransfered=0;
byOutputBuffer[0] = 0xA0;/* Write command (3bits) */
byOutputBuffer[0] = byOutputBuffer[0] | ( ( address >> 3) & 0x0F );/*5 most significant add bits*/
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BYTES|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE);
APP_CHECK_STATUS(status);
/*Write 3 least sig address bits */
sizeToTransfer=3;
sizeTransfered=0;
byOutputBuffer[0] = ( address & 0x07 ) << 5; /* least significant 3 address bits */
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS);
APP_CHECK_STATUS(status);
/* Write 2 byte data + CS_Low */
sizeToTransfer=2;
sizeTransfered=0;
byOutputBuffer[0] = (uint8_t)(data & 0xFF);
byOutputBuffer[1] = (uint8_t)((data & 0xFF00)>>8);
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BYTES|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);
 /* Wait until D0 is high */
#if 1
 /* Strobe Chip Select */
sizeToTransfer=0;
sizeTransfered=0;
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE);
APP_CHECK_STATUS(status);
#ifndef __linux__
Sleep(10);
#endif
sizeToTransfer=0;
sizeTransfered=0;
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);
#else
retry=0;
state=FALSE;
SPI_IsBusy(handle,&state);
while((FALSE==state) && (retry<SPI_WRITE_COMPLETION_RETRY))
{
printf("SPI device is busy(%u)\n",(unsigned)retry);
SPI_IsBusy(ftHandle,&state);
retry++;
}
#endif
 /* Write command EWEN(with CS_High -> CS_Low) */
sizeToTransfer=11;
sizeTransfered=0;
byOutputBuffer[0]=0x8F;/* SPI_EWEN -> binary 10011xxxxxx (11bits) */
byOutputBuffer[1]=0xFF;
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);
return status;
}

SPI 读函数:

FT_STATUS read_byte(FT_HANDLE handle, uint8_t address, uint16_t *data)
{
uint32_t sizeToTransfer = 0;
uint32_t sizeTransfered;
//bool writeComplete=0;
//uint32_t retry=0;
//bool state;
FT_STATUS status;
/* CS_High + Write command + Address */
sizeToTransfer=1;
sizeTransfered=0;
byOutputBuffer[0] = 0xC0;/* Write command (3bits)*/
byOutputBuffer[0] = byOutputBuffer[0] | ( ( address >> 3) & 0x0F );/*5 most significant add bits*/
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BYTES|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE);
APP_CHECK_STATUS(status);
/*Write partial address bits */
sizeToTransfer=4;
sizeTransfered=0;
byOutputBuffer[0] = ( address & 0x07 ) << 5; /* least significant 3 address bits */
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS);
APP_CHECK_STATUS(status);
/*Read 2 bytes*/
sizeToTransfer=2;
sizeTransfered=0;
status = SPI_Read(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BYTES|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);
*data = (uint16_t)(byOutputBuffer[1]<<8);
*data = (*data & 0xFF00) | (0x00FF & (uint16_t)byOutputBuffer[0]);
return status;
}

SPI flash读写实验:

在这里插入图片描述

相关源码

bsp_ft2232.h

#ifndef BSP_FT2232_H
#define BSP_FT2232_H

#include "mainwindow.h"
//#include "ui_mainwindow.h"

#include<stdio.h>
#include<stdlib.h>
///* OS specific libraries */
#ifdef _WIN32
#include<windows.h>
#endif


#include <windows.h>


#include "../lib/ftd2xx.h"
#include "../lib/libmpsse_spi.h"
//#include "../lib/libmpsse_i2c.h"


class bsp_ft2232
{
private:



public:
     enum typePinA{pinA3=3,pinA4=4};
     enum typePinB{pinB3=3,pinB4=4};
     bsp_ft2232();
     int bsp_GetDevcieNumber();
     void bsp_ledA(enum typePinA chl,bool highlow);
     void bsp_ledB(enum typePinB chl,bool highlow);
     void bsp_ledtest(bool highlow);
};

#endif // BSP_FT2232_H

bsp_ft2232.c

#include "bsp_ft2232.h"


/******************************************************************************/
/* Macro and type defines
 */
/******************************************************************************/
/* Helper macros */
#define APP_CHECK_STATUS(exp) {                                                                              \
    if(exp!=FT_OK){                                                                                          \
                qDebug("%s:%d:%s(): status(0x%x) != FT_OK\n",__FILE__, __LINE__, __FUNCTION__,exp);          \
                exit(1);                                                                                     \
                  }else{ qDebug ("status ok!");                                                              \
                 }                                                                                           \
};
#define CHECK_NULL(exp){                                                                                     \
    if(exp==NULL){                                                                                           \
                qDebug("%s:%d:%s(): NULL expression encountered \n",__FILE__, __LINE__, __FUNCTION__);       \
                exit(1);                                                                                     \
                }else{   qDebug ("not null !");                                                              \
                }                                                                                            \
};

#define SPI_DEVICE_BUFFER_SIZE 256
FT_HANDLE ftHandle[2];
FT_STATUS status;
DWORD     numDevs;
ChannelConfig channelConf;
uint8_t gpio_setting[2]={0xff,0xff}; //0001 1000 =0x18;
uint8_t byOutputBuffer[SPI_DEVICE_BUFFER_SIZE];

DWORD dwNumBytesToSend = 0; //Index of output buffer
DWORD dwNumBytesSent = 0;
DWORD dwNumBytesRead = 0;
DWORD dwNumInputBuffer = 0;

FT_STATUS read_byte(FT_HANDLE handle, uint8_t address, uint16_t *data)
{
uint32_t sizeToTransfer = 0;
uint32_t sizeTransfered;
//bool writeComplete=0;
//uint32_t retry=0;
//bool state;
FT_STATUS status;
/* CS_High + Write command + Address */
sizeToTransfer=1;
sizeTransfered=0;
byOutputBuffer[0] = 0xC0;/* Write command (3bits)*/
byOutputBuffer[0] = byOutputBuffer[0] | ( ( address >> 3) & 0x0F );/*5 most significant add bits*/
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BYTES|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE);
APP_CHECK_STATUS(status);
/*Write partial address bits */
sizeToTransfer=4;
sizeTransfered=0;
byOutputBuffer[0] = ( address & 0x07 ) << 5; /* least significant 3 address bits */
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS);
APP_CHECK_STATUS(status);
/*Read 2 bytes*/
sizeToTransfer=2;
sizeTransfered=0;
status = SPI_Read(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BYTES|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);
*data = (uint16_t)(byOutputBuffer[1]<<8);
*data = (*data & 0xFF00) | (0x00FF & (uint16_t)byOutputBuffer[0]);
return status;
}








FT_STATUS write_byte(FT_HANDLE handle,uint8_t address, uint16_t data)
{
uint32_t sizeToTransfer = 0;
uint32_t sizeTransfered=0;
//bool writeComplete=0;
//uint32_t retry=0;
//bool state;
FT_STATUS status;
/* Write command EWEN(with CS_High -> CS_Low) */
sizeToTransfer=11;
sizeTransfered=0;
byOutputBuffer[0]=0x9F;/* SPI_EWEN -> binary 10011xxxxxx (11bits) */
byOutputBuffer[1]=0xFF;
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);

/* CS_High + Write command + Address */
sizeToTransfer=1;
sizeTransfered=0;
byOutputBuffer[0] = 0xA0;/* Write command (3bits) */
byOutputBuffer[0] = byOutputBuffer[0] | ( ( address >> 3) & 0x0F );/*5 most significant add bits*/
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BYTES|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE);
APP_CHECK_STATUS(status);
/*Write 3 least sig address bits */
sizeToTransfer=3;
sizeTransfered=0;
byOutputBuffer[0] = ( address & 0x07 ) << 5; /* least significant 3 address bits */
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS);
APP_CHECK_STATUS(status);
/* Write 2 byte data + CS_Low */
sizeToTransfer=2;
sizeTransfered=0;
byOutputBuffer[0] = (uint8_t)(data & 0xFF);
byOutputBuffer[1] = (uint8_t)((data & 0xFF00)>>8);
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BYTES|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);
 /* Wait until D0 is high */
#if 1
 /* Strobe Chip Select */
sizeToTransfer=0;
sizeTransfered=0;
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE);
APP_CHECK_STATUS(status);
#ifndef __linux__
Sleep(10);
#endif
sizeToTransfer=0;
sizeTransfered=0;
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);
#else
retry=0;
state=FALSE;
SPI_IsBusy(handle,&state);
while((FALSE==state) && (retry<SPI_WRITE_COMPLETION_RETRY))
{
printf("SPI device is busy(%u)\n",(unsigned)retry);
SPI_IsBusy(ftHandle,&state);
retry++;
}
#endif
 /* Write command EWEN(with CS_High -> CS_Low) */
sizeToTransfer=11;
sizeTransfered=0;
byOutputBuffer[0]=0x8F;/* SPI_EWEN -> binary 10011xxxxxx (11bits) */
byOutputBuffer[1]=0xFF;
status = SPI_Write(handle, byOutputBuffer, sizeToTransfer, ( (unsigned long *)(&sizeTransfered) ),
SPI_TRANSFER_OPTIONS_SIZE_IN_BITS|
SPI_TRANSFER_OPTIONS_CHIPSELECT_ENABLE|
SPI_TRANSFER_OPTIONS_CHIPSELECT_DISABLE);
APP_CHECK_STATUS(status);
return status;
}


bsp_ft2232::bsp_ft2232()
{
    FT_STATUS status;

#ifdef _MSC_VER
//Init_libMPSSE();
#endif
    uint32_t channels;
    channelConf.ClockRate = 5000;
    channelConf.LatencyTimer= 255;
    channelConf.configOptions = SPI_CONFIG_OPTION_MODE0 | SPI_CONFIG_OPTION_CS_DBUS3;
    channelConf.Pin = 0x00000000;/*FinalVal-FinalDir-InitVal-InitDir (for dir 0=in, 1=out)*/

    status = SPI_GetNumChannels((DWORD *)&channels);
    APP_CHECK_STATUS(status);
    qDebug("Number of available SPI channels = %d\n",channels);

    /* Open the first available channel */
    status = SPI_OpenChannel(0,&ftHandle[0]);
    APP_CHECK_STATUS(status);
    qDebug("\nhandle=0x%x status=0x%x\n",ftHandle[0],status);
    status = SPI_InitChannel(ftHandle[0],&channelConf);
    APP_CHECK_STATUS(status);


//    status = SPI_CloseChannel(ftHandle[0]);

    /* Open the first available channel */
    status = SPI_OpenChannel(1,&ftHandle[1]);
    APP_CHECK_STATUS(status);
    qDebug("\nhandle=0x%x status=0x%x\n",ftHandle[1],status);
    status = SPI_InitChannel(ftHandle[1],&channelConf);
    APP_CHECK_STATUS(status);


//    status = SPI_CloseChannel(ftHandle[1]);




//    FT_DEVICE_LIST_INFO_NODE devList[2];
//    status = SPI_GetChannelInfo(0,&devList[0]);
//    APP_CHECK_STATUS(status);
//    qDebug("Information on channel number %d:\n",0);
//    /* print the dev info */
//    qDebug(" Flags=0x%x\n",devList[0].Flags);
//    qDebug(" Type=0x%x\n",devList[0].Type);
//    qDebug(" ID=0x%x\n",devList[0].ID);
//    qDebug(" LocId=0x%x\n",devList[0].LocId);
//    qDebug(" SerialNumber=%s\n",devList[0].SerialNumber);
//    qDebug(" Description=%s\n",devList[0].Description);
//    qDebug(" ftHandle=0x%x\n",devList[0].ftHandle);/*is 0 unless open*/

//    status = SPI_GetChannelInfo(1,&devList[1]);
//    APP_CHECK_STATUS(status);
//    qDebug("Information on channel number %d:\n",1);
//    /* print the dev info */
//    qDebug(" Flags=0x%x\n",devList[1].Flags);
//    qDebug(" Type=0x%x\n",devList[1].Type);
//    qDebug(" ID=0x%x\n",devList[1].ID);
//    qDebug(" LocId=0x%x\n",devList[1].LocId);
//    qDebug(" SerialNumber=%s\n",devList[1].SerialNumber);
//    qDebug(" Description=%s\n",devList[1].Description);
//    qDebug(" ftHandle=0x%x\n",devList[1].ftHandle);/*is 0 unless open*/



}

int bsp_ft2232::bsp_GetDevcieNumber()
{
    status = FT_CreateDeviceInfoList(&numDevs);		// Get the number of FTDI devices
    APP_CHECK_STATUS(status);
    qDebug("%d FTDI devices found - the count includes individual ports on a single chip\n", (int)numDevs);
    return  numDevs;
}

void bsp_ft2232::bsp_ledA(enum typePinA chl, bool highlow)
{
uint8_t val=0;
FT_ReadGPIO(ftHandle[0],&val);
FT_WriteGPIO(ftHandle[0],gpio_setting[0], ( highlow ? (val|(0x1<<(chl)) ) : (val&(~(0x1<<(chl))) ) ) );
}

void bsp_ft2232::bsp_ledB(enum typePinB chl, bool highlow)
{
    uint8_t val=0;
    FT_ReadGPIO(ftHandle[1],&val);
    FT_WriteGPIO(ftHandle[1],gpio_setting[1], ( highlow ? (val|(0x1<<(chl)) ) : (val&(~(0x1<<(chl))) ) ) );
}

void bsp_ft2232::bsp_ledtest(bool highlow)
{
    if(highlow)
    {
        dwNumBytesToSend = 0;
        byOutputBuffer[dwNumBytesToSend++] = 0x82;
        byOutputBuffer[dwNumBytesToSend++] = 0xFF;
        byOutputBuffer[dwNumBytesToSend++] = 0xFF;
        status = FT_Write(ftHandle[0], byOutputBuffer, dwNumBytesToSend, &dwNumBytesSent);
        qDebug("on %d\r\n",dwNumBytesSent);
        dwNumBytesSent=0;
        dwNumBytesToSend = 0;

    }else{
        dwNumBytesToSend = 0;
        byOutputBuffer[dwNumBytesToSend++] = 0x82;
        byOutputBuffer[dwNumBytesToSend++] = 0x00;
        byOutputBuffer[dwNumBytesToSend++] = 0xFF;
        status = FT_Write(ftHandle[0], byOutputBuffer, dwNumBytesToSend, &dwNumBytesSent);
        qDebug("off %d\r\n",dwNumBytesSent);
        dwNumBytesSent=0;
        dwNumBytesToSend = 0;
    }
}




本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/388530.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

剑指offer——数值的整数次方

目录 1. 题目描述2. 一般思路2.1 有问题的思路2.2 全面但不高效的思路2.3 面试小提示 3. 全面又高效的思路 1. 题目描述 题目:实现函数 double Power(double base,int exponent)&#xff0c;求base 的exponent 次方。不得使用库函数&#xff0c;同时不需要考虑大数问题 2. 一般…

4核16g云服务器多少钱?

4核16G服务器租用优惠价格26元1个月&#xff0c;腾讯云轻量4核16G12M服务器32元1个月、96元3个月、156元6个月、312元一年&#xff0c;阿腾云atengyun.com分享4核16服务器租用费用价格表&#xff0c;阿里云和腾讯云详细配置报价和性能参数表&#xff1a; 腾讯云4核16G服务器价…

VSCode汉化以及跳转到函数定义设置

目录 VSCode汉化设置跳转到函数定义 VSCode汉化 一、目前默认是英文状态 二、按下ShiftCtrlP弹出这个框框 三、点击语言显示配置 四、点击下载语言 五、点击下载中文即可 六、下载完后&#xff0c;再按ShiftCtrlP&#xff0c;选择语言配置 七、选择第二个&#xff0c;中…

Swift Combine 级联多个 UI 更新,包括网络请求 从入门到精通十六

Combine 系列 Swift Combine 从入门到精通一Swift Combine 发布者订阅者操作者 从入门到精通二Swift Combine 管道 从入门到精通三Swift Combine 发布者publisher的生命周期 从入门到精通四Swift Combine 操作符operations和Subjects发布者的生命周期 从入门到精通五Swift Com…

点餐|外卖订餐小程序|基于微信小程序的外卖订餐系统设计与实现(源码+数据库+文档)

点餐|外卖订餐小程序目录 目录 基于微信小程序的外卖订餐系统设计与实现 一、前言 二、系统功能设计 三、系统实现 1、用户微信端功能模块 2、管理员服务端功能模块 3、商家务端功能模块 四、数据库设计 1、实体ER图 五、核心代码 六、论文参考 七、最新计算机毕设…

Spring Boot整合 Cache 以Redis服务 处理数据缓存

目录 一、SpringBoot框架 二、什么是cache 三、redis介绍 四、高速缓存 一、SpringBoot框架 Spring Boot是一个基于Java的开源框架&#xff0c;用于快速构建独立的、可运行的、生产级的Spring应用程序。它简化了Spring应用程序的配置和部署过程&#xff0c;并提供了许多开…

git stash 正确用法

目录 一、背景 二、使用 2.1 使用之前&#xff0c;先简单了解下 git stash 干了什么&#xff1a; 2.2 git stash 相关命令 2.3 使用流程 1. 执行 git stash 2. 查看刚才保存的工作进度 git stash list 3. 这时候在看分支已经是干净无修改的(改动都有暂存到 stash) 4. 现在…

山脉的个数/攀登者

题目描述 攀登者喜欢寻找各种地图&#xff0c;并且尝试攀登到最高的山峰。 地图表示为一维数组&#xff0c;数组的索引代表水平位置&#xff0c;数组的元素代表相对海拔高度。其中数组元素0代表地面。 例如&#xff1a;[0,1,2,4,3,1,0,0,1,2,3,1,2,1,0]&#xff0c;代表如下…

代码随想录刷题笔记 DAY 26 | 组合总和 No.39 | 组合求和 II No.40 | 分割回文串 No.131

文章目录 Day 2501. 组合总和&#xff08;No. 39&#xff09;1.1 题目1.2 笔记1.3 代码 02. 组合求和 II&#xff08;No. 40&#xff09;2.1 题目2.2 笔记2.3 代码 03. 分割回文串&#xff08;No. 131&#xff09;3.1 题目3.2 笔记3.3 代码 Day 25 01. 组合总和&#xff08;No…

【计算机网络】网络层之IP协议

文章目录 1.基本概念2.协议头格式3.网段划分4.特殊的IP地址5.IP地址的数量限制6.私有IP地址和公网IP地址7.路由 1.基本概念 IP地址是定位主机的&#xff0c;具有一个将数据报从A主机跨网络可靠的送到B主机的能力。 但是有能力就一定能做到吗&#xff0c;只能说有很大的概率。…

寒假作业:2024/2/14

作业1&#xff1a;编程实现二维数组的杨辉三角 代码&#xff1a; #include <stdio.h> #include <string.h> #include <stdlib.h> int main(int argc, const char *argv[]) {int n;printf("please enter n:");scanf("%d",&n);int a…

【Spring MVC篇】返回响应

个人主页&#xff1a;兜里有颗棉花糖 欢迎 点赞&#x1f44d; 收藏✨ 留言✉ 加关注&#x1f493;本文由 兜里有颗棉花糖 原创 收录于专栏【Spring MVC】 本专栏旨在分享学习Spring MVC的一点学习心得&#xff0c;欢迎大家在评论区交流讨论&#x1f48c; 目录 一、返回静态页面…

164基于matlab的奇异值分解、小波降噪、zoom细化

基于matlab的奇异值分解、小波降噪、zoom细化。程序已调通&#xff0c;可直接运行。 164 奇异值分解 小波降噪 zoom细化 (xiaohongshu.com)

vue学习106-120

创建项目p106 router&#xff0c;store和app.vue不用删 清一下router里的路由配置 vant组件库p107 目标&#xff1a;认识第三方vue组件库vant-ui&#xff08;cv战士&#xff09; 封装好了的组件整合在一起就是组件库 http://vant-contrib.gitee.io/vant/v2/#/zh-CN/ vue2用va…

python自学...

一、稍微高级一点的。。。 1. 闭包&#xff08;跟js差不多&#xff09; 2. 装饰器 就是spring的aop 3. 多线程

开窗,挖槽,放电齿,拼版

我们在阻焊层画线&#xff0c;就相当于去掉绿油阻焊&#xff0c;开窗一般是用在大电流走线的时候。先画要走的导线&#xff0c;之后切换到TopSolder或者Bottom Solder层&#xff0c;然后Place->line 画一条和原来先粗细一样的线即可&#xff01;但走电流的仍然是导线&#x…

第21讲关于我们页面实现

关于我们页面实现 关于锋哥页面author.vue 我们这里用一个vip宣传页面&#xff0c;套一个web-view <template><web-view src"http://www.java1234.com/vip.html"></web-view> </template><script> </script><style> <…

信息学奥赛一本通1258:【例9.2】数字金字塔

1258&#xff1a;【例9.2】数字金字塔 时间限制: 1000 ms 内存限制: 65536 KB 提交数: 44051 通过数: 26272 【题目描述】 观察下面的数字金字塔。写一个程序查找从最高点到底部任意处结束的路径&#xff0c;使路径经过数字的和最大。每一步可以从当前点走到左下方…

[嵌入式系统-15]:RT-Thread -1- 简介与技术架构

目录 一、RT-Thread简介 1.1 简介 1.2 功能特点 1.3 发展历史 1.4 应用场合 1.5 与Linux的比较 1.6 ​​​​​​​RT-Thread优缺点 二、技术架构 2.1 分层架构​编辑 2.2 功能组件 2.3 应用程序接口RT-Thread API 2.4 应用程序接口&#xff1a;RT-Thread API、POS…

[HCIE]vxlan --静态隧道

实验目的:1.pc2与pc3互通&#xff08;二层互通&#xff09;&#xff1b;2.pc1与pc3互通&#xff08;三层互通&#xff09; 实验说明&#xff1a;sw1划分vlan10 vlan20 ;sw2划分vlan30&#xff1b;上行接口均配置为Trunk 实验步骤&#xff1a; 1.配置CE1/CE2/CE3环回口互通&a…