uboot - pinctrl - FPGA回片前测试阶段 - 设置GPIO引脚复用失败

问题描述

pinctrl设置引脚复用失败,没有调用到controller中的set_groups_function函数。

问题定位

  1. pinctrl如何注册dm节点
  2. 如何进行设备树中各个设备节点下的复用配置
  3. 为什么没调用到控制器实现的set_groups_function函数
&gpio0 {status = "okay";pinctrl-names = "default";pinctrl-0 = <&gpioa15_pinctrl>;
};&pinctrl {gpioa15 {gpioa15_pinctrl: gpioa15_grp {ts,pins = <PB7>;mux,val = <5>;function = "gpioa15";groups = "gpioa15_grp";};};
};

pinctrl如何注册dm节点

调用过程:

[uboot/drivers/core/device.c]
int device_probe(struct udevice *dev)/* Process pinctrl for everything except the root device, and* continue regardless of the result of pinctrl. Don't process pinctrl* settings for pinctrl devices since the device may not yet be* probed. * */pinctrl_select_state(dev, "default");pinctrl_select_state_simple(dev);/** Try full-implemented pinctrl first.* If it fails or is not implemented, try simple one.*/if (pinctrl_select_state_full(dev, statename))return pinctrl_select_state_simple(dev);UCLASS_DRIVER(pinctrl) = {.id = UCLASS_PINCTRL,.post_bind = pinctrl_post_bind,.flags = DM_UC_FLAG_SEQ_ALIAS,.name = "pinctrl",ret = uclass_pre_probe_device(dev);ret = uclass_post_probe_device(dev);uc_drv->post_probepinctrl_post_bindreturn pinconfig_post_bind(dev);pinctrl_select_state(dev, "default");pinctrl_select_state_full(dev, statename)ret = pinctrl_config_one(config);ops = pinctrl_get_ops(pctldev);/* this ops was set by controller */return ops->set_state(pctldev, config);};

上面的调用过程是通过加log找出来的,log如下:

__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:68                                                  
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:482                                                                         
__file:drivers/core/device.c __func:device_probe __line:482                                                                         
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:460                                                                         
__file:drivers/core/device.c __func:device_probe __line:476                                                                         
__file:drivers/core/device.c __func:device_probe __line:479                                                                         
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:68                                                  
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:482                                                                         
initr_nand bypass                                                                                                                   
MMC:   __file:drivers/core/device.c __func:device_probe __line:431                                                                  
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:460                                                                         
__file:drivers/core/device.c __func:device_probe __line:476                                                                         
__file:drivers/core/device.c __func:device_probe __line:479                                                                         
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:68                                                  
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:482                                                                         
dev 0x00000000bf741ec0, size 0xa0, name mmc@f0512000, ofnode 10c4, mmc@f0512000                                                     
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:460                                                                         
__file:drivers/core/device.c __func:device_probe __line:476                                                                         
__file:drivers/core/device.c __func:device_probe __line:479                                                                         
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:68                                                  
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:482                                                                         
dev 0x00000000bf742260, size 0xa0, name mmc@f0513000, ofnode 1158, mmc@f0513000                                                     
__file:drivers/core/device.c __func:device_probe __line:431        

看着就是在pinctrl_select_state_full 函数里出了问题:
每次进入pinctrl_select_state_full 函数只能打印到68行,下面的打印出不来,没有调到pinctrl_config_one,所以设备树里注册的gpioa15_pinctrl没有被配置。

/*** pinctrl_select_state_full() - full implementation of pinctrl_select_state** @dev: peripheral device* @statename: state name, like "default"* @return: 0 on success, or negative error code on failure*/
static int pinctrl_select_state_full(struct udevice *dev, const char *statename)
{char propname[32]; /* long enough */const fdt32_t *list;uint32_t phandle;struct udevice *config;int state, size, i, ret;printf("__file:%s __func:%s __line:%d\n", __FILE__, __func__, __LINE__);state = dev_read_stringlist_search(dev, "pinctrl-names", statename);if (state < 0) {char *end;/** If statename is not found in "pinctrl-names",* assume statename is just the integer state ID.*/state = simple_strtoul(statename, &end, 10);if (*end)return -EINVAL;}
printf("__file:%s __func:%s __line:%d\n", __FILE__, __func__, __LINE__);snprintf(propname, sizeof(propname), "pinctrl-%d", state);list = dev_read_prop(dev, propname, &size);if (!list)return -EINVAL;size /= sizeof(*list);printf("__file:%s __func:%s __line:%d size:%d\n", __FILE__, __func__, __LINE__, size);for (i = 0; i < size; i++) {phandle = fdt32_to_cpu(*list++);ret = uclass_get_device_by_phandle_id(UCLASS_PINCONFIG, phandle,&config);if (ret) {dev_warn(dev, "%s: uclass_get_device_by_phandle_id: err=%d\n",__func__, ret);continue;}
printf("__file:%s __func:%s __line:%d\n", __FILE__, __func__, __LINE__);ret = pinctrl_config_one(config);if (ret) {dev_warn(dev, "%s: pinctrl_config_one: err=%d\n",__func__, ret);continue;}}return 0;
}

初步怀疑是69行这里state = dev_read_stringlist_search(dev, "pinctrl-names", statename); 返回的state是个非法值。打印出来看看:
果然都是非法值,-61!!!

pinctrl_probe                                                                                                                       
reg_base:f0389000                                                                                                                   
npins  : 78                                                                                                                         
nfuncs : 1                                                                                                                          
ngroups: 1                                                                                                                          func:gpioa15, ngroups = 1                                                                                                           
grp_index = 0                                                                                                                       
group[0] name gpioa15_grp                                                                                                           
mux_val: 0x5                                                                                                                        
npins: 1                                                                                                                            
15                                                                                                                                  
ts_pinctrl_parse_dt done                                                                                                            
ts pinctrl initialized                                                                                                              
__file:drivers/core/device.c __func:device_probe __line:523                                                                         
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:68                                                  
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:70  state:-61                                       
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:482                                                                         
__file:drivers/core/device.c __func:device_probe __line:482                                                                         
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:460                                                                         
__file:drivers/core/device.c __func:device_probe __line:476                                                                         
__file:drivers/core/device.c __func:device_probe __line:479                                                                         
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:68                                                  
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:70  state:-61                                       
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:482                                                                         
initr_nand bypass                                                                                                                   
MMC:   __file:drivers/core/device.c __func:device_probe __line:431                                                                  
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:460                                                                         
__file:drivers/core/device.c __func:device_probe __line:476                                                                         
__file:drivers/core/device.c __func:device_probe __line:479                                                                         
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:68                                                  
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:70  state:-61                                       
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:482                                                                         
dev 0x00000000bf741ec0, size 0xa0, name mmc@f0512000, ofnode 10c4, mmc@f0512000                                                     
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:460                                                                         
__file:drivers/core/device.c __func:device_probe __line:476                                                                         
__file:drivers/core/device.c __func:device_probe __line:479                                                                         
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:68                                                  
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:70  state:-61                                       
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:482                                          

uboot的异常宏号码列表
uboot/include/linux/errno.h

#define	EBFONT		59	/* Bad font file format */
#define	ENOSTR		60	/* Device not a stream */
#define	ENODATA		61	/* No data available */

dev_read_stringlist_search的定义:

static inline int dev_read_stringlist_search(const struct udevice *dev,const char *propname,const char *string)
{return ofnode_stringlist_search(dev_ofnode(dev), propname, string);
}int ofnode_stringlist_search(ofnode node, const char *property,const char *string)
{if (ofnode_is_np(node)) {//maybe bug here?return of_property_match_string(ofnode_to_np(node),property, string);} else {int ret;ret = fdt_stringlist_search(gd->fdt_blob,ofnode_to_offset(node), property,string);if (ret == -FDT_ERR_NOTFOUND)//maybe bug here?return -ENODATA;else if (ret < 0)return -EINVAL;return ret;}
}

上面注释中有两个位置可能返回了ENODATA,此处已经开始怀疑是不是设备树描述地有问题了。回头看了一下dts中,pinctrl-names属性是存在的。。。
但是dts虽然有,编译出dtb到后不一定还是存在的,这里通过请教前辈,有哪些fdt的调试手段,前辈推荐了fdt命令,在uboot中可以用于显示设备树信息:
如何使用:

  1. 通过printenv,找到fdtcontroladdr属性的值,此为fdt所在地址
  2. 运行fdt fdtcontroladdr
  3. 运行fdt list
    找到gpio和pinctrl节点所在:
    在这里插入图片描述
    可以看到gpio及其pinctrl配置,实际已经配置进去了。
    从这里开始,我就觉得不对劲了,只能开始请神了,所以我找了原先的pinctrl mantainer。原先的mantainer说:
    uboot中GPIO节点的pinctrl配置,是必须在gpio命令运行完毕之后,才会进行pinctrl的配置的!

恍然大悟,之前没有注意过这个特性,我运行了gpio set 15 1后:

=> gpio set 15 1                                                                                                                    
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:460                                                                         
__file:drivers/core/device.c __func:device_probe __line:476                                                                         
__file:drivers/core/device.c __func:device_probe __line:479                                                                         
dev->name:gpio@f0390000                                                                                                             
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:70                                                  
fdt_stringlist_search len:8                                                                                                         
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:72  state:0 name:default                            
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:83                                                  
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:90 size:1                                           
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:460                                                                         
__file:drivers/core/device.c __func:device_probe __line:476                                                                         
__file:drivers/core/device.c __func:device_probe __line:479                                                                         
dev->name:gpioa15                                                                                                                   
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:70                                                  
const fdt_stringlist_search == FDT_ERR_NOTFOUND                                                                                     
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:72  state:-61 name:default                          
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:482                                                                         
__file:drivers/core/device.c __func:device_probe __line:460                                                                         
__file:drivers/core/device.c __func:device_probe __line:476                                                                         
__file:drivers/core/device.c __func:device_probe __line:479                                                                         
dev->name:gpioa15_grp                                                                                                               
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:70                                                  
const fdt_stringlist_search == FDT_ERR_NOTFOUND                                                                                     
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:72  state:-61 name:default                          
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:482                                                                         
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:100                                                 
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_config_one __line:32                                                         
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_config_one __line:34                                                         
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_config_one __line:36                                                         
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_config_one __line:38                                                         
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_config_one __line:44                                                         
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_config_one __line:36                                                         
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_config_one __line:38                                                         
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_config_one __line:44                                                         
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_config_one __line:50                                                         
__func:pinctrl_generic_set_state line:340                                                                                           
__func:pinctrl_generic_set_state_subnode line:301                                                                                   
>>>get group[0] gpioa15_grp                                                                                                         
__func:pinctrl_generic_set_state_subnode line:326                                                                                   
__func:pinctrl_generic_set_state_one line:250                                                                                       
__func:pinctrl_generic_set_state_one line:261                                                                                       
__func:pinmux_enable_setting line:119                                                                                               
set_mux, function:0, group:0                                                                                                        
group name:gpioa15_grp, func name:gpioa15 mux_val:5                                                                                 
pin15, wr 0x00000000f038912c, val 0x50000000                                                                                        
__file:drivers/core/device.c __func:device_probe __line:482                                                                         
failed to get gpio clock                                                                                                            
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:460                                                                         
__file:drivers/core/device.c __func:device_probe __line:476                                                                         
__file:drivers/core/device.c __func:device_probe __line:479                                                                         
dev->name:pa                                                                                                                        
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:70                                                  
const fdt_stringlist_search == FDT_ERR_NOTFOUND                                                                                     
__file:drivers/pinctrl/pinctrl-uclass.c __func:pinctrl_select_state_full __line:72  state:-61 name:default                          
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:482                                                                         
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
gpio: pin 15 (gpio 15) value is 1                                                                                                   
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:431                                                                         
__file:drivers/core/device.c __func:device_probe __line:431  

可以看到name:default已经找到了,再使用devmem查看pinctrl对应的B组寄存器值:

=> md 0xf038912c                                                                                                                    
f038912c: 50000000 00000000 00000000 00000000    ...P............                                                                   
f038913c: 00000000 00000000 00000000 00000000    ................                                                                   
f038914c: 00000000 00000000 00000000 00000000    ................                                                                   
f038915c: 00000000 00000000 00000000 00000000    ................                                                                   
f038916c: 00000000 00000000 00000000 00000000    ................                                                                   
f038917c: 00000000 00000000 00000000 00000000    ................                                                                   
f038918c: 00000000 00000000 00000000 00000000    ................                                                                   
f038919c: 00000000 00000000 00000000 00000000    ................                                                                   
f03891ac: 00000000 00000000 00000000 00000000    ................                                                                   
f03891bc: 00000000 00000000 00000000 00000000    ................                                                                   
f03891cc: 00000000 00000000 00000000 00000000    ................                                                                   
f03891dc: 00000000 00000000 00000000 00000000    ................                                                                   
f03891ec: 00000000 00000000 00000000 00000000    ................                                                                   
f03891fc: 00000000 000000ff 00000000 00000000    ................                                                                   
f038920c: 00000000 000000ff 00000000 00000000    ................                                                                   
f038921c: 00000000 00000000 00000000 00000000    ................                                                                   
=>   

func5配置成功。

TODO:gpio中如何调用到pinctrl配置接口

推荐链接:
https://blog.csdn.net/ZHONGCAI0901/article/details/117986327

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

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

相关文章

VMware Workstation Pro 17虚拟机超级详细搭建(含redis,nacos,docker)(一)

今天从零搭建一下虚拟机的环境&#xff0c;把nacos&#xff0c;redis等微服务组件还有数据库搭建到里面&#xff0c;首先看到的是我们最开始下载VMware Workstation Pro 17 之后的样子&#xff0c;总共一起应该有三部分因为篇幅太长了 下载地址 : VMware - Delivering a Digit…

Vue动态设置控制表格列表展现列

最近遇到一个需求,表格列表默认不展示某一列,当我设置后可以展示该列,也可以展示和隐藏别的列,起到可以对整个表格列展示隐藏控制的效果,如下示例,默认不展示“单位名称”这一列,在我点击设置齿轮后可以看到,有“单位名称”这一列,但未打钩: 当我勾中“单位名称”,…

第2讲-Memory(5)外存

磁盘存储器 组成 记录原理 性能指标 (磁盘存取时间的计算) 磁盘地址 工作过程 优点 ①存储容量大,位价格低; ②记录介质可重复使用; ③记录信息可长期保存而不丢失,甚至可脱机存档; ④非破坏性读出,读出时不需要再生。 缺点 存取速度慢,机械结构复杂,对工作环境…

在wps的word中如何引用正确引用参考文献

目录 插入参考文献编号把插入的编号置于右上角最终效果 插入参考文献编号 把插入的编号置于右上角 最终效果

面试算法-88-反转链表

题目 给你单链表的头节点 head &#xff0c;请你反转链表&#xff0c;并返回反转后的链表。 示例 1&#xff1a; 输入&#xff1a;head [1,2,3,4,5] 输出&#xff1a;[5,4,3,2,1] 解 class Solution {public ListNode reverseList(ListNode head) {if(head null || hea…

大数据技术在工厂生产数字转型中的应用与价值

hello宝子们...我们是艾斯视觉擅长ui设计和前端开发10年经验&#xff01;希望我的分享能帮助到您&#xff01;如需帮助可以评论关注私信我们一起探讨&#xff01;致敬感谢感恩&#xff01; 随着大数据技术的快速发展&#xff0c;越来越多的企业开始关注并应用大数据技术&#x…

HCIP-Datacom(H12-821)新题

最新 HCIP-Datacom&#xff08;H12-821&#xff09;完整题库请扫描上方二维码访问&#xff0c;持续更新中。 以下关于OSPF的描述&#xff0c;哪些项是正确的&#xff1f; A. 第二类外部路由的开销值只是AS外部开销值&#xff0c;忽略AS内部开销值 B. AS-External-LSA描述的是…

prettier + eslint 配置

vue-cli 新建项目选择 ESLint Prettier 会自动下载相关包 settings.json {"editor.formatOnSave": true, // 开启保存文件自动格式化代码"editor.defaultFormatter": "esbenp.prettier-vscode", // 默认的代码格式化工具// "prettier.r…

【C++航海王:追寻罗杰的编程之路】stack

目录 1 -> stack的介绍和使用 1.1 -> stack的介绍 1.2 -> stack的使用 1.3 -> stack的模拟实现 1 -> stack的介绍和使用 1.1 -> stack的介绍 stack的文档介绍 1. stack是一种容器适配器&#xff0c;专门用在具有后进先出操作的上下文环境中&#xff0c…

力扣---零钱兑换---动态规划

思路&#xff1a; 这是一道典型的动态规划问题&#xff08;希望下次不用提示&#xff0c;能直接认出来&#xff09;&#xff1a;我将g[i]定义为总金币为i所需的最少硬币个数。所以递推公式可以表示为&#xff1a;g[i]min(g[i-1],g[i-2],g[i-5])1&#xff0c;也就是g[i]min(g[i-…

【Python音视频技术】玩AI视频创作引发写Python音视频技术系列文章1---视频添加字幕

最近对视频创作感兴趣&#xff0c; 详情见之前写的几篇文章。 【AI应用】模仿爆款视频二次创作短视频操作步骤 【人工智能】AI数字人视频演示 【人工智能】AI视频二次创作演示 作为程序员出身的我&#xff0c;看到一些功能, 我都有猎奇的习惯&#xff0c; 想着自己用什么技…

js数据流详细讲解

文章目录 单向数据流单向数据流示例: 双向数据流双向数据流示例: 延伸和扩展状态管理Redux 示例&#xff1a; 异步数据流异步操作示例&#xff08;使用 async/await&#xff09;&#xff1a; 数据转换和处理数据处理示例&#xff08;使用 lodash&#xff09;&#xff1a; 实时数…

【软件测试】探索和学习在模型中的软件测试

&#x1f308;个人主页: Aileen_0v0 &#x1f525;热门专栏: 华为鸿蒙系统学习|计算机网络|数据结构与算法|MySQL| ​&#x1f4ab;个人格言:“没有罗马,那就自己创造罗马~” #mermaid-svg-JIGESSc1ecUpVUnH {font-family:"trebuchet ms",verdana,arial,sans-serif;f…

七种查找方式(Java)

一、基本查找 也叫做顺序查找 说明&#xff1a;顺序查找适合于存储结构为数组或者链表。 基本思想&#xff1a;顺序查找也称为线形查找&#xff0c;属于无序查找算法。从数据结构线的一端开始&#xff0c;顺序扫描&#xff0c;依次将遍历到的结点与要查找的值相比较&#xff…

数字功放VS模拟功放,选择适合你的音频解决方案

数字功放和模拟功放是音频系统中常用的两种功放技术&#xff0c;适用于不同的音频应用&#xff0c;都具有各自的优势和特点。本文将为您详细介绍数字功放和模拟功放的差异&#xff0c;并帮助您找到适合自己的音频解决方案。 1、数字功放是一种利用数字信号处理技术的功放。它将…

Unity:2D

目录 1. 简介 2. 2D Sorting 3. 9-slicing Sprites 3.1 9-slicing and Colliders 4. Sprite Renderer 5. Sprite Creator 6. Sprite Editor 6.1 Slice 6.1 Resize polygons 6.2 Custom Outline 6.3 Custom Physics Shape 6.4 Secondary Textures 6.5 Data Provider…

基础:TCP四次挥手做了什么,为什么要挥手?

1. TCP 四次挥手在做些什么 1. 第一次挥手 &#xff1a; 1&#xff09;挥手作用&#xff1a;主机1发送指令告诉主机2&#xff0c;我没有数据发送给你了。 2&#xff09;数据处理&#xff1a;主机1&#xff08;可以是客户端&#xff0c;也可以是服务端&#xff09;&#xff0c…

常见六大WEB安全问题

一、XSS跨站脚本攻击 1.Cross-Site Scripting&#xff08;跨站脚本攻击&#xff09;简称 XSS&#xff08;因为缩写和 CSS重叠&#xff0c;所以只能叫 XSS&#xff09;&#xff0c;是一种代码注入攻击。攻击者通过在目标网站上注入恶意脚本&#xff0c;使之在用户的浏览器上运行…

力扣---全排列---回溯

思路&#xff1a; 递归做法&#xff0c;一般会有visit数组来判断第 i 位是否被考虑了。我们先考虑第0位&#xff0c;再考虑第1位&#xff0c;再考虑第2位...dfs函数中还是老套路&#xff0c;先判定特殊条件&#xff0c;再从当下的角度&#xff08;决定第 j 位是哪个元素&#x…

Java 枚举(超详细讲解)

Java语言的强大之处在于它提供了多种多样的类库&#xff0c;从而大大提高了程序的编程效率和质量。 一、枚举 事先考虑到某一变量可能的取值&#xff0c;尽可能用自然语言忠表意清楚的单词来表示它的每一个值&#xff0c;用这中思路定义的类型被称为枚举类型。 枚举事由一组固…