platfrom tree架构下实现3-Wire驱动(DS1302)

目录

概述

1 认识DS1302

1.1 DS1302 硬件电路

1.2 操作DS1302 

1.3 注意要点

2 IO引脚位置

3 添加驱动节点

3.1 更新内核.dts

3.2 更新板卡.dtb

4 驱动程序实现

4.1  编写驱动程序

4.2 编写驱动程序的Makefile

4.3 安装驱动程序

5 验证驱动程序

5.1 编写测试程序

5.2 编写测试程序代码Makefile

5.3 运行测试App

6 实时波形分析


概述

       本文介绍在platform-tree框架下如何实现复杂总线驱动程序,以DS1302为例,详细介绍如何在linux内核中,添加driver tree节点,以及如何在驱动程序中,调用多线接口IO。

1 认识DS1302

DS1302 数据手册和产品信息 | 亚德诺(ADI)半导体 (analog.com)

         DS1302是一款使用非常普遍的实时时钟芯片,可提供,年月日,时分秒,week实时数据。其和MCU直接的电路也非常简单,只需3个引脚(CE, IO , CLK)。

主要特性

  • 完全管理所有计时功能
    • 实时时钟可为秒、分、小时、日期、月、星期和年计数,闰年补偿有效期至2100年
    • 31 x 8电池供电通用RAM
  • 通过简单的串行端口与大多数微控制器进行接口
    • 简单的3线接口
    • TTL兼容(VCC = 5V)
    • 用于读取或写入时钟或RAM数据的单字节或多字节(突发模式)数据传输
  • 低功耗运行可延长备用电池运行时间
    • 2.0V至5.5V全面运行
    • 2.0V时电流消耗小于300nA
  • 8引脚DIP和8引脚SO封装充分减少了所需空间
  • 可选工业温度范围:-40°C至+85°C支持在多种应用中工作

1.1 DS1302 硬件电路

CE: 使能引脚

IO: 数据引脚(读/写数据)

SCLK: 时钟引脚

1.2 操作DS1302 

读寄存器波形如下:

CE: 高电平有效

写地址时,CLK上升沿有效

读数据时,CLK下降沿有效

写寄存器波形:

CE: 高电平有效

写地址时,CLK上升沿有效

写数据时,CLK上升沿有效

1.3 注意要点

从DS1302中读取的时间数据位BCD码,所以,在实际运用时,需要将其转化为十进制,例如:

// 从寄存器中读出的值为: 0x14,使用时需要将其转化为14,方法如下:
static unsigned char bcd_2_dem(unsigned char x)
{return (x>>4)*10+(x&0x0f);                   //高4位乘以10,再加上低4位,即得到数值
}

初始化DS1302寄存器时,要进行上述数据转换的逆操作,方法如下:

// 如果要配置分钟数为25分钟,写到寄存器的值应该是: 0x25。转换方法如下:unsigned char dem_2_bcd( unsigned char val )
{return (((val/10)& 0x0f)<<4)|((val%10)&0x0f);
}

2 IO引脚位置

DS1302芯片在测试底板上的IO引脚位置:

//GPIO4_24:  DS1302_CE
//GPIO4_26:  DS1302_IO
//GPIO4_28:  DS1302_CLKCE_1302  = P2^4;   -----   D3   -- GPIO4_24
IO_1302  = P2^3;   -----   D5   -- GPIO4_26
CLK_1302 = P2^2;   -----   D7   -- GPIO4_28

硬件实物图:

在板卡ATK-DL6Y2C上DS1302的对应接口:

3 添加驱动节点

3.1 更新内核.dts

DS1302引脚和IMX.6ULL引脚对应关系:

GPIO4_24:  DS1302_CE   
GPIO4_26:  DS1302_IO
GPIO4_28:  DS1302_CLK

.dts文件路径:

/home/mftang/linux_workspace/study_atk_dl6y2c/kernel/atk-dl6u2c/arch/arm/boot/dts/imx6ull-14x14-evk.dts

1) 使用 i.MX Pins Tool v6 配置IO Pin

2) 添加IOMUXC数据至.dts文件

3)添加设备compatible至.dts文件

代码信息

	//mftang: user's ds1302, 2024-1-31//GPIO4_24:  DS1302_CE//GPIO4_26:  DS1302_IO//GPIO4_28:  DS1302_CLKmftangds1302 {compatible = "atk-dl6y2c,ds1302";pinctrl-names = "default";pinctrl-0 = <&pinctrl_gpio_mftangds1302>;ce-gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>;io-gpios = <&gpio4 26 GPIO_ACTIVE_HIGH>;clk-gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>;status = "okay";};	

4) 编译.dts文件

在内核根目录下使用

make dtbs

5) 复制 .dtb 文件至NFS共享目录

cp arch/arm/boot/dts/imx6ull-14x14-emmc-4.3-480x272-c.dtb  /home/mftang/nfs/atk_dl6y2c/

3.2 更新板卡.dtb

开发版中的.dtb文件存放位置:

cd /run/media/mmcblk1p1

在开发板上把 .dtb文件复制到应用目录中:

cp /mnt/atk_dl6y2c/imx6ull-14x14-emmc-4.3-480x272-c.dtb /run/media/mmcblk1p1

复制.dtb文件到相应的运行目录,然后重新板卡。在/proc/device-tree中可以看见device节点,然后可以在driver中使用该节点。

4 驱动程序实现

4.1  编写驱动程序

驱动程序源码:

/***************************************************************
Copyright  2024-2029. All rights reserved.
文件名     : drv_09_tree_hs0038.c
作者       : tangmingfei2013@126.com
版本       : V1.0
描述       : ds1302 驱动程序
其他       : 无
日志       : 初版V1.0 2024/02/01  使用方法:
1) 在.dts文件中定义节点信息//mftang: user's ds1302, 2024-1-31//GPIO4_24:  DS1302_CE//GPIO4_26:  DS1302_IO//GPIO4_28:  DS1302_CLKmftangds1302 {compatible = "atk-dl6y2c,ds1302";pinctrl-names = "default";pinctrl-0 = <&pinctrl_gpio_mftangds1302>;gpios-ce = <&gpio4 24 GPIO_ACTIVE_HIGH>;gpios-io = <&gpio4 26 GPIO_ACTIVE_HIGH>;gpios-clk = <&gpio4 28 GPIO_ACTIVE_HIGH>;status = "okay";};2) 在驱动匹配列表 
static const struct of_device_id ds1302_of_match[] = {{ .compatible = "atk-dl6y2c,ds1302" },{ } // Sentinel
};3) 驱动使用方法:
typedef struct{unsigned char second;unsigned char minute;unsigned char hour;unsigned char week;unsigned char day;unsigned char month;unsigned char year;
}stru_ds1302_rtc;stru_ds1302_rtc rtc;read(fd, &rtc, sizeof(stru_ds1302_rtc));***************************************************************/
#include <linux/module.h>
#include <linux/poll.h>#include <linux/fs.h>
#include <linux/errno.h>
#include <linux/miscdevice.h>
#include <linux/kernel.h>
#include <linux/major.h>
#include <linux/mutex.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/stat.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/tty.h>
#include <linux/kmod.h>
#include <linux/gfp.h>
#include <linux/gpio/consumer.h>
#include <linux/platform_device.h>
#include <linux/of_gpio.h>
#include <linux/of_irq.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/slab.h>
#include <linux/fcntl.h>
#include <linux/timer.h>
#include <linux/workqueue.h>
#include <asm/current.h>#define DEVICE_NAME      "treeds1302"     // dev/treeds1302/* ds1302dev设备结构体 */
struct ds1302stru_dev{dev_t   devid;                 /* 设备号          */struct  cdev cdev;             /* cdev            */struct  class *class;          /* 类              */struct  device *device;        /* 设备            */int     major;                 /* 主设备号        */struct  device_node *node;     /* ds1302设备节点  */int     userds1302;            /* ds1302 GPIO标号 */struct  gpio_desc *pin_ce;struct  gpio_desc *pin_io;struct  gpio_desc *pin_clk;
};struct ds1302stru_dev ds1302dev;         /* ds1302设备 */
static wait_queue_head_t ds1302_wq;static const unsigned char RTC_REG[7] = {0x80, 0x82, 0x84, 0x86, 0x88, 0x8a, 0x8c};/*device 相关的驱动程序 
*/
static unsigned char bcd_2_dem(unsigned char x)
{return (x>>4)*10+(x&0x0f);                   //高4位乘以10,再加上低4位,即得到数值
}static void ds1302_wr_byte(unsigned char dat)    //DS1302:写入操作
{unsigned char i;for(i=0;i<8;i++){if(dat&0x01){                            //从低字节开始传送gpiod_direction_output(ds1302dev.pin_io, 1); // ds1302 io = 1}else {gpiod_direction_output(ds1302dev.pin_io, 0); // ds1302 io = 0}// CLK_1302=0;  gpiod_direction_output(ds1302dev.pin_clk, 0);// CLK_1302=1;gpiod_direction_output(ds1302dev.pin_clk, 1);dat = dat>>1;}
}static unsigned char ds1302_rd_byte(void)  //DS1302:读取操作   
{unsigned char i,temp = 0;// IO_1302 as inputgpiod_direction_input( ds1302dev.pin_io );for(i=0;i<8;i++){if( gpiod_get_value(ds1302dev.pin_io) )temp=temp|0x80;elsetemp=temp&0x7f;// CLK_1302 = 1gpiod_direction_output(ds1302dev.pin_clk, 1);// CLK_1302 = 0gpiod_direction_output(ds1302dev.pin_clk, 0);temp=temp>>1;}return(temp);
}static void write_ds1302_reg(unsigned char addr,unsigned char dat)
{unsigned long flags;local_irq_save(flags);//CLK_1302=0;gpiod_direction_output(ds1302dev.pin_clk,0);//CE_1302=1; gpiod_direction_output(ds1302dev.pin_ce, 1);ds1302_wr_byte(addr); ds1302_wr_byte(dat);//CE_1302=0;gpiod_direction_output(ds1302dev.pin_ce, 0);//CLK_1302=0;gpiod_direction_output(ds1302dev.pin_clk,0);local_irq_restore(flags); 
}static unsigned char read_ds1302_reg(unsigned char addr)   
{unsigned long flags;unsigned char temp;local_irq_save(flags);// CLK_1302=0gpiod_direction_output(ds1302dev.pin_clk, 0);// CE_1302=1 gpiod_direction_output(ds1302dev.pin_ce, 1);ds1302_wr_byte(addr);      //写入地址temp = ds1302_rd_byte();// CE_1302=0gpiod_direction_output(ds1302dev.pin_ce, 0);// CLK_1302=0gpiod_direction_output(ds1302dev.pin_clk, 0);local_irq_restore(flags);return(temp);
} static void ds1302_wr_wp(unsigned char wp)
{if (wp)write_ds1302_reg(0x8e,0x80);elsewrite_ds1302_reg(0x8e,0x00);
}static void ds1302_stop(unsigned char flag)
{unsigned char chold;chold = read_ds1302_reg(0x81);if (flag)write_ds1302_reg(0x80,chold|0x80);elsewrite_ds1302_reg(0x80,chold&0x7f);
}static unsigned char ds1302_read_rtc( unsigned char reg )
{unsigned char dat;dat = read_ds1302_reg(reg);return  bcd_2_dem(dat);
}static void ds1302_get_rtc( unsigned char *buff)
{int LEN = sizeof(RTC_REG);int i = 0;for( i = 0; i < LEN; i++ ){buff[i] = ds1302_read_rtc( RTC_REG[i]|0x01);}
}static void ds1302_drv_init( unsigned char *buff )
{unsigned long flags;unsigned char temp,val;int LEN = sizeof(RTC_REG);int i;ds1302_stop(1);    // stop clockds1302_wr_wp(0);   // enable write local_irq_save(flags);for ( i=0; i < LEN; i++){val = buff[i];temp = (((val/10)& 0x0f)<<4)|((val%10)&0x0f);write_ds1302_reg( RTC_REG[i], temp );}local_irq_restore(flags);ds1302_wr_wp(1);  // disable write ds1302_stop(0);   // enable clock 
}/*linux driver 驱动接口: 实现对应的open/read/write等函数,填入file_operations结构体
*/
static ssize_t ds1302_drv_write(struct file *filp, const char __user *buf, size_t cnt, loff_t *offt)
{int LEN = sizeof(RTC_REG);unsigned char tempbuff[LEN];int length;length = copy_from_user(tempbuff, buf, LEN);if( cnt != LEN ){printk(" %s line %d write ds1302 register error! \r\n",  __FUNCTION__, __LINE__);return 0;}else{ds1302_drv_init( tempbuff );}return cnt;
}static ssize_t ds1302_drv_read (struct file *file, char __user *buf, size_t size, loff_t *offset)
{int LEN = sizeof(RTC_REG);unsigned char tempbuff[LEN];int length;ds1302_get_rtc( tempbuff );length = copy_to_user(buf, tempbuff, LEN);return length;
}static unsigned int ds1302_drv_poll(struct file *fp, poll_table * wait)
{printk(" %s line %d \r\n",  __FUNCTION__, __LINE__);return 0;
}static int ds1302_drv_close(struct inode *node, struct file *file)
{printk(" %s line %d \r\n",  __FUNCTION__, __LINE__);return 0;
}/* 定义driver的file_operations结构体
*/
static struct file_operations ds1302_fops = {.owner   = THIS_MODULE,.write   = ds1302_drv_write,.read    = ds1302_drv_read,.poll    = ds1302_drv_poll,.release = ds1302_drv_close,
};/* 1. 从platform_device获得GPIOmftangds1302 {compatible = "atk-dl6y2c,ds1302";pinctrl-names = "default";pinctrl-0 = <&pinctrl_gpio_mftangds1302>;ce-gpios = <&gpio4 24 GPIO_ACTIVE_HIGH>;io-gpios = <&gpio4 26 GPIO_ACTIVE_HIGH>;clk-gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>;status = "okay";};*/
static int ds1302_probe(struct platform_device *pdev)
{printk("ds0302 driver and device was matched!\r\n");/* 1. 获得硬件信息 */ds1302dev.pin_ce = gpiod_get(&pdev->dev, "ce", 0);if (IS_ERR(ds1302dev.pin_ce)){printk("%s line %d get ce parameter error! \n", __FUNCTION__, __LINE__);}ds1302dev.pin_io = gpiod_get(&pdev->dev, "io", 0);if (IS_ERR(ds1302dev.pin_io)){printk("%s line %d get io parameter error! \n", __FUNCTION__, __LINE__);}ds1302dev.pin_clk = gpiod_get(&pdev->dev, "clk", 0);if (IS_ERR(ds1302dev.pin_clk)){printk("%s line %d get clk parameter error! \n", __FUNCTION__, __LINE__);}/* 2. device_create */device_create( ds1302dev.class, NULL, MKDEV( ds1302dev.major, 0 ), NULL, DEVICE_NAME);  return 0;
}static int ds1302_remove(struct platform_device *pdev)
{device_destroy( ds1302dev.class, MKDEV( ds1302dev.major, 0));gpiod_put(ds1302dev.pin_ce);gpiod_put(ds1302dev.pin_io);gpiod_put(ds1302dev.pin_clk);return 0;
}static const struct of_device_id atk_dl6y2c_ds1302[] = {{ .compatible = "atk-dl6y2c,ds1302" },{ },
};/* 1. 定义platform_driver */
static struct platform_driver ds1302_pltdrv = {.probe      = ds1302_probe,.remove     = ds1302_remove,.driver     = {.name   = "atk_ds1302",.of_match_table = atk_dl6y2c_ds1302,},
};/* 2. 在入口函数注册platform_driver */
static int __init ds1302_init(void)
{printk("%s line %d\n",__FUNCTION__, __LINE__);/* register file_operations  */ds1302dev.major = register_chrdev( 0, DEVICE_NAME,     /* device name */&ds1302_fops);  /* create the device class  */ds1302dev.class = class_create(THIS_MODULE, "ds1302_class");if (IS_ERR(ds1302dev.class)) {printk("%s line %d\n", __FUNCTION__, __LINE__);unregister_chrdev( ds1302dev.major, DEVICE_NAME);return PTR_ERR( ds1302dev.class );}init_waitqueue_head(&ds1302_wq);return platform_driver_register(&ds1302_pltdrv); 
}/* 3. 有入口函数就应该有出口函数:卸载驱动程序时,就会去调用这个出口函数*    卸载platform_driver*/
static void __exit ds1302_exit(void)
{printk("%s line %d\n", __FUNCTION__, __LINE__);platform_driver_unregister(&ds1302_pltdrv);class_destroy(ds1302dev.class);unregister_chrdev(ds1302dev.major, DEVICE_NAME);
}/* 7. 其他完善:提供设备信息,自动创建设备节*/module_init(ds1302_init);
module_exit(ds1302_exit);MODULE_LICENSE("GPL");
MODULE_AUTHOR("tangmingfei2013@126.com");

4.2 编写驱动程序的Makefile

PWD := $(shell pwd)KERNEL_DIR=/home/mftang/linux_workspace/study_atk_dl6y2c/kernel/atk-dl6u2c
ARCH=arm
CROSS_COMPILE=/home/ctools/gcc-linaro-4.9.4-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-export  ARCH  CROSS_COMPILEobj-m:= drv_10_tree_ds1302.oall:$(MAKE) -C $(KERNEL_DIR) M=$(PWD) modulesclean:rm -rf .*.cmd *.o *.mod.c *.ko .tmp_versions *.order *.symvers

4.3 安装驱动程序

在dev/目录下查看驱动程序

5 验证驱动程序

5.1 编写测试程序

测试程序源码

/***************************************************************
Copyright  2024-2029. All rights reserved.
文件名  : test_10_tree_ds1302.c
作者    : tangmingfei2013@126.com
版本    : V1.0
描述    : ds1302 测试程序,用于测试 drv_10_tree_ds1302
日志    : 初版V1.0 2024/1/29***************************************************************/
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>#define DEV_NAME    "/dev/treeds1302"typedef struct{unsigned char second;unsigned char minute;unsigned char hour;unsigned char week;unsigned char day;unsigned char month;unsigned char year;
}stru_ds1302_rtc;stru_ds1302_rtc rtc;int main(int argc, char **argv)
{int fd;fd = open(DEV_NAME, O_RDWR);if (fd < 0){printf("can not open file %s \r\n", DEV_NAME);return -1;}// init rtc rtc.year = 24;rtc.month = 2;rtc.day = 1;rtc.week = 4;rtc.hour = 18;rtc.minute = 2;rtc.second = 0;write(fd, &rtc, sizeof(stru_ds1302_rtc));while(1){read(fd, &rtc, sizeof(stru_ds1302_rtc));printf(" %02d-%02d-%02d week %d   %02d:%02d:%02d \r\n",  rtc.year, rtc.month, rtc.day, rtc.week,rtc.hour,rtc.minute, rtc.second);sleep(1);}close(fd);return 0;
}

5.2 编写测试程序代码Makefile

CFLAGS= -Wall -O2
CC=/home/ctools/gcc-linaro-4.9.4-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc
STRIP=/home/ctools/gcc-linaro-4.9.4-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-striptest_10_tree_ds1302: test_10_tree_ds1302.o$(CC) $(CFLAGS) -o test_10_tree_ds1302 test_10_tree_ds1302.o$(STRIP) -s test_10_tree_ds1302clean:rm -f test_10_tree_ds1302 test_10_tree_ds1302.o

5.3 运行测试App

运行测试程序后,系统会初始化DS1302的时间,然后每隔1s从芯片中读取时间

6 实时波形分析

分析一个简单的波形,从寄存器:0x81中读取秒数据,秒数为57,具体波形图如下

读一个完整的年月日时分秒波形

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

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

AI-数学-高中-21-三角函数-cosx的图像与性质

原作者视频&#xff1a;三角函数】8cosx的图像与性质&#xff08;易中档&#xff09;_哔哩哔哩_bilibili cosx图像&#xff1a;就是sinx往左平移π/2的图像。 对称中心&#xff1a;找到一个点&#xff0c;翻转180度能跟自己重合。

QXlsx Qt操作excel

QXlsx 是一个用于处理Excel文件的开源C库。它允许你在你的C应用程序中读取和写入Microsoft Excel文件&#xff08;.xlsx格式&#xff09;。该库支持多种操作&#xff0c;包括创建新的工作簿、读取和写入单元格数据、格式化单元格、以及其他与Excel文件相关的功能。 支持跨平台…

Intellij IDEA各种调试+开发中常见bug

Intellij IDEA中使用好Debug&#xff0c;主要包括如下内容&#xff1a; 一、Debug开篇 ①、以Debug模式启动服务&#xff0c;左边的一个按钮则是以Run模式启动。在开发中&#xff0c;我一般会直接启动Debug模式&#xff0c;方便随时调试代码。 ②、断点&#xff1a;在左边行…

【日常总结】SourceTree 1.5.2.0 更换用户名称和密码

一、场景 二、问题 三、解决方案 > 方案一&#xff1a;删除缓存文件 > 方案二&#xff1a;更新最新版本&#xff0c;可以直接修改密码&#xff08;推荐&#xff09; 方案一&#xff1a;删除缓存文件 Stage 1&#xff1a;设置显示隐藏文件 Stage 2&#xff1a;打开…

一分钟了解电脑关机快捷键是什么!

在日常使用电脑的过程中&#xff0c;了解一些基本的快捷键是提高效率的关键之一。其中&#xff0c;电脑关机快捷键是一个方便且迅速的操作&#xff0c;使您可以在不用通过烦琐的菜单操作的情况下&#xff0c;快速关机电脑。在本文中&#xff0c;我们将探讨电脑关机快捷键是什么…

微信小程序使用ucharts折线图,有负数显示0刻度线

当数据有负数和正数的时候默认不会显示0刻度线&#xff0c;不方便看出正负对比 实现思路&#xff1a;显示的刻度线是根据数据的最大值和最小值自动分配到刻度线上面&#xff0c;把最大值和最小值设置为一样&#xff0c;然后平均分配给五个刻度线中间的刻度线就会为0就实现了显…

03-Java单例模式 ( Singleton Pattern )

单例模式 单例模式设计要点单例模式基础实现摘要实现范例 单例模式的几种实现方式1. 懒汉式&#xff0c;线程不安全2. 懒汉式&#xff0c;线程安全3. 饿汉式4. 双检锁/双重校验锁&#xff08;DCL&#xff0c;即 double-checked locking&#xff09;5. 登记式/静态内部类6. 枚举…

【刷题题解】编辑距离

给你两个单词 word1 和 word2&#xff0c; 请返回将 word1 转换成 word2 所使用的最少操作数 。 你可以对一个单词进行如下三种操作&#xff1a; 插入一个字符删除一个字符替换一个字符 这道题也是&#xff0c;一眼动态规划&#xff0c;乍一看感觉很复杂&#xff0c;仔细思考…

python算法与数据结构---动态规划

动态规划 记不住过去的人&#xff0c;注定要重蹈覆辙。 定义 对于一个模型为n的问题&#xff0c;将其分解为k个规模较小的子问题&#xff08;阶段&#xff09;&#xff0c;按顺序求解子问题&#xff0c;前一子问题的解&#xff0c;为后一子问题提供有用的信息。在求解任一子…

TCP与UDP:传输层协议的差异与选择

在计算机网络中&#xff0c;传输控制协议&#xff08;TCP&#xff09;和用户数据报协议&#xff08;UDP&#xff09;是两种常用的传输层协议。然而&#xff0c;随着互联网的快速发展&#xff0c;传统的TCP和UDP在某些场景下存在一些限制。为了解决这些问题&#xff0c;出现了新…

Python 数据可视化:配色方案

1、引言 在这篇文章中&#xff0c;我们将研究Python的一些配色方案&#xff0c;主要是Seaborn库。这将采用 Python Notebook 格式&#xff0c;其中包括绘图的代码。 2、实验数据 首先导入必要的库&#xff1a; import pandas as pd import seaborn as sns import matplotlib…

802.11n 802.11ac (WiFi 4/5 )的核心要点

802.11n 802.11ac &#xff08;WiFi 4/5 &#xff09;是什么&#xff1f; WiFi 4&#xff1a; Ieee 802.11n Enhancements for High Throughput &#xff08;HT&#xff09; WiFi 5&#xff1a; Ieee 802.11ac Enhancements for Very High Throughput &#xff08;VHT&#x…