USB - libusbg vs libusbgx

libusbg

GitHub - libusbg/libusbg: USB Gadget Configfs Library

libusbgx

GitHub - linux-usb-gadgets/libusbgx: C library encapsulating the Linux kernel USB gadget configfs userspace API functionality

libusbg 和 libusbgx 都是与 Linux 中 USB gadgets配置相关的库。它们的主要区别在于,libusbgx 是 libusbg 的延续,封装了 Linux 内核 USB gadget configfs 用户空间 API 功能。libusbgx 提供了使用 configfs API 创建和解析 USB gadget设备的例程,并支持内核 3.11 版中启用的所有 USB gadget configfs 功能。它也被称为 libusbg-neXt,包括对原始 libusbg 的改进和附加功能。该库采用 GNU LGPL-2.1(或更高版本)授权,其中提供的示例采用 GNU GPL-2.0(或更高版本)授权。

libusbg and libusbgx are both libraries related to the configuration of USB gadgets in Linux. The key difference is that libusbgx is a continuation of libusbg, encapsulating the Linux kernel USB gadget configfs userspace API functionality. libusbgx provides routines for creating and parsing USB gadget devices using the configfs API and supports all USB gadget configfs functions that can be enabled in kernel release 3.111. It is also known as libusbg-neXt and includes improvements and additional features over the original libusbg2. The library is licensed under the GNU LGPL-2.1 (or later), and the examples provided within it are licensed under the GNU GPL-2.0 (or later)1.

Libusbg 和 libusbgx 都是为方便与 USB 小工具设备交互而设计的 C 语言库,但两者之间存在明显差异。

Libusbg and libusbgx are both C libraries designed to facilitate the interaction with USB gadget devices, but there are distinct differences between the two.

Functionality and Scope: (功能和范围)

* Libusbg:

该库主要侧重于封装内核 USB 小工具配置文件用户空间 API 功能,并提供两个传输接口。它支持所有 USB 传输类型(控制、批量、中断、等时),并提供对 USB 小工具设备属性、配置属性和功能属性的支持。Libusbg 允许使用 configfs API 创建和解析 USB 小工具设备,并提供获取和设置 USB 小工具设备属性和属性的例程。

* Libusbg: 

This library primarily focuses on encapsulating the kernel USB gadget-configfs userspace API functionality and offers two transfer interfaces. It supports all USB transfer types (control, bulk, interrupt, isochronous) and provides support for USB gadget device attributes, configuration attributes, and function attributes. Libusbg allows for the creation and parsing of USB gadget devices using the configfs API, and it provides routines for getting and setting USB gadget device attributes and properties.

* libusbgx:

相比之下,libusbgx 是一个功能更丰富的库,它扩展了 libusbg 的功能。它包括用于显示和配置 USB 小工具设备的实用程序,并提供内部 API 以简化对新功能的添加支持。此外,libusbgx 还支持 MIDI、大容量存储和环回等其他功能,使其在 USB 小工具功能方面更加多样化。该库全面支持 Linux ConfigFS、FunctionFS 和 USB 小工具 API。

* Libusbgx: 

In contrast, libusbgx is a more feature-rich library that expands on the functionality of libusbg. It includes utilities to display and configure USB gadget devices and provides an internal API to simplify adding support for new functions. Furthermore, libusbgx supports additional functions such as MIDI, Mass Storage, and Loopback, making it more diverse in terms of USB gadget functionality. This library is well-rounded for Linux ConfigFS, FunctionFS, and USB Gadget API.

Licensing: (许可)

* Libusbg: 它根据 GNU 通用公共许可证 3.0 版 (GPLv3) 和 GNU 图书馆或较小通用公共许可证 3.0 版 (LGPLv3) 发布。

* Libusbgx: 该库根据 GNU LGPL-2.1(或更高版本)发布,示例根据 GNU GPL-2.0(或更高版本)授权。libusbgx 的许可与 libusbg 不同,这表明它们的开发路径各不相同。

* Libusbg: It is released under the GNU General Public License version 3.0 (GPLv3) and GNU Library or Lesser General Public License version 3.0 (LGPLv3).

* Libusbgx: This library is released under the GNU LGPL-2.1 (or later), and the examples are licensed under the GNU GPL-2.0 (or later). The licensing for libusbgx differs from that of libusbg, indicative of their separate development pathways.

摘要:尽管 libusbg 和 libusbgx 都旨在为管理 USB 小工具设备提供类似的基本功能,但后者(即 libusbgx)是一个更全面、功能更丰富的库,提供更广泛的工具和功能,包括对各种 USB 小工具功能和 API 的额外支持。另一方面,与 libusbgx 相比,libusbg 更专注于 USB 小工具配置用户空间 API 功能的核心封装,并涉及更基本的功能集。

Summary: While both libusbg and libusbgx aim to provide similar fundamental functionality for managing USB gadget devices, the latter, libusbgx, stands out as a more comprehensive and feature-rich library, offering a broader set of tools and functions, including additional support for various USB gadget functions and APIs. On the other hand, libusbg is more focused on the core encapsulation of USB gadget-configfs userspace API functionality and involves a more basic feature set compared to libusbgx.

参考:

1,Liner AI

2,Bing copilot

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

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

相关文章

List操作add,clear,addall报错UnsupportedOperationException的解决办法

ArrayList和Arrays.ArrayList是两码事 ArrayList 支持 add,clear,addall Arrays.ArrayList不支持add,clear,addall 这个方法的使用时候,传递的数组必须是对象数组,而不是基本数据类型 JDK源码 /** *返回由…

Linux 安装部署高性能缓存服务redis

Linux 系统安装Redis 5 注意事项: 下载Redis 文件包,并上传至linux服务上解压 tar -zxvf redis.tar安装: 编译 make PREFIX/usr/local/redis install配置: redis.conf daemonize yes bind 127.0.0.1 192.168.1.221 supervised…

2024.3.31 机器学习周报

引言 Abstract 文献阅读 1、题目 Lite-HRNet: A Lightweight High-Resolution Network 2、引言 我们提出了一个高效的高分辨率网络,Lite-HRNet,用于人体姿态估计。首先,我们简单地将Shuf Chronenet中的高效shuffle块应用于HRNet&#x…

逻辑分析仪使用杂记

50MSa为采样深度:对被测信号一次采集的样点总数。它决定了一次采样所能采集到的数据量的多少,深度越大,一次采集的数据量越大。 16MHZ为采样率:对被测信号进行采样的频率,也就是每秒所采集的样点数。它决定了一次采样…

小程序内多种直播方案对比

我可以为您提供一个基于您提供信息的简单对比表,以便您对比视频号直播、小程序直播和三方SDK直播的不同特点和成本。在做出最终决定前,建议您还需要考虑直播质量、用户体验、后续支持和维护等因素。 特点/平台视频号直播小程序直播三方SDK直播直播方式通…

328——二维矩阵值变为1最小操作次数 next、nextInt、nextLine

一、next、nextInt、nextLine区别 1.next() next()不光是接收键盘输入的内容,而且还进行分割。例如默认分隔符为空格 Scanner sc new Scanner(System.in);while (true){String str sc.next();System.out.println(str "A");}// 输出结果 input&#…

【算法】归并排序(迭代法)

简介 归并排序有两种实现方法: 递归法(Top-down implementation)迭代法(Bottom-up implementation)关于归并排序的介绍请看之前的 归并排序(递归法)。 算法步骤(迭代) 设待排列序列有 n 个序列。子序列宽度为 width = 1。 将宽度为 width 的子序列每对相邻两个子序…

备考ICA----Istio实验14---出向流量管控Egress Gateways实验

备考ICA----Istio实验14—出向流量管控Egress Gateways实验 1. 发布测试用 pod kubectl apply -f istio/samples/sleep/sleep.yaml kubectl get pods -l appsleep2. ServiceEntry 创建一个ServiceEntry允许流量访问edition.cnn.com egressgw/edition-ServiceEntry.yaml api…

代码随想录Day38

Day 38 动态规划 part01 今日任务 斐波那契数 爬楼梯 使用最小花费爬楼梯 代码实现 斐波那契数 //递归public int fib(int n) {if (n 0) {return 0;}if (n 1) {return 1;}return fib(n - 1) fib(n - 2);}//动态规划public int fib2(int n) {if (n < 1) return n;in…

科技下乡:数字乡村改变乡村生活方式

在科技飞速发展的时代&#xff0c;数字化、信息化浪潮正以前所未有的速度席卷全球。在这场科技革命中&#xff0c;乡村不再是滞后的代名词&#xff0c;而是成为了数字乡村建设的热土。科技下乡&#xff0c;让数字乡村成为了改变乡村生活方式的重要力量。 一、科技下乡&#xf…

(学习日记)2024.03.25:UCOSIII第二十二节:系统启动流程详解

写在前面&#xff1a; 由于时间的不足与学习的碎片化&#xff0c;写博客变得有些奢侈。 但是对于记录学习&#xff08;忘了以后能快速复习&#xff09;的渴望一天天变得强烈。 既然如此 不如以天为单位&#xff0c;以时间为顺序&#xff0c;仅仅将博客当做一个知识学习的目录&a…

STM32之HAL开发——I2C读写EEPROM

I2C功能框图&#xff08;F1系列&#xff09; STM32 的 I2C 外设可用作通讯的主机及从机&#xff0c;支持 100Kbit/s 和 400Kbit/s 的速率&#xff0c;支持 7 位、 10 位设备地址&#xff0c;支持 DMA 数据传输&#xff0c;并具有数据校验功能&#xff0c;I2C 外设还支持 SMBus2…

工作日志- 不定期更新

1. protobuf中使用import引用其他proto文件&#xff0c;生成后在go语言的go modules中import 包名报错问题。 public.proto文件 //protoc --go_outpluginsgrpc:. public.proto syntax "proto3";package public;option go_package "self/game-service/msg/pu…

3D产品可视化SaaS

“我们正在走向衰退吗&#xff1f;” “我们已经陷入衰退了吗&#xff1f;” “我们正在步入衰退。” 过去几个月占据头条的问题和陈述引发了关于市场对每个行业影响的讨论和激烈辩论。 特别是对于科技行业来说&#xff0c;过去几周一直很动荡&#xff0c;围绕费用、增长和裁…

Webpack生成企业站静态页面 - ajax请求

一些项目因需求不同&#xff0c;如需SEO或小项目&#xff0c;使用angular、react或vue就大材小用了。可以通过webpack、gulp这些构建工具&#xff0c;也能快速完成html页面开发&#xff0c;并且也能使用less/sass/styus等样式预编译功能&#xff0c;以及将js、html分模块、分组…

RabbitMQ高级笔记

视频链接&#xff1a;【黑马程序员RabbitMQ入门到实战教程】 文章目录 1.发送者的可靠性1.1.生产者重试机制1.2.生产者确认机制1.3.实现生产者确认1.3.1.开启生产者确认1.3.2.定义ReturnCallback1.3.3.定义ConfirmCallback 2.MQ的可靠性2.1.数据持久化2.1.1.交换机持久化2.1.2.…

小米汽车SU7发布,售价21.59万起,订单总额破1亿

文 | 大力财经 小米召开新车发布会&#xff0c;正式发布小米 SU7。该车定位中大型纯电轿车&#xff0c;有 SU7、SU7 Pro、SU7 Max 三个版本&#xff0c;车身尺寸 4997/1963/1455mm&#xff0c;轴距 3000mm。售价 21.59-29.99 万。 新车发布后&#xff0c;市场反应热烈&#x…

Redis 过期删除策略 And 内存淘汰策略 !!!

一、Redis过期删除策略&#xff08;什么时候删除&#xff09; 1、惰性删除&#xff1a;放任键过期不管&#xff0c;但是每次从键空间中获取键时&#xff0c;都检查取得的键是否过期&#xff0c;如果过期的话就删除该键&#xff0c;如果没有过期就返回该键。 2、定期删除&…

Topaz Gigapixel AI for Mac 图像放大软件

Topaz Gigapixel AI for Mac是一款专为Mac用户设计的智能图像放大软件。它采用了人工智能技术&#xff0c;特别是深度学习算法&#xff0c;以提高图像的分辨率和质量&#xff0c;使得图像在放大后仍能保持清晰的细节。这款软件的特点在于其能够将低分辨率的图片放大至高分辨率&…

openPLC_Editor C语言编程 在mp157 arm板上调用io等使用记录

1.编程界面比较简单&#xff0c;具备PLC开发编程的四种编程方式。梯形图语言LD &#xff0c;指令表语言IL&#xff0c;结构化文本语言ST&#xff0c;功能模块图语言FBD。 2.官方使用手册。学习资料实在是太少&#xff0c;目前都是自己比较费劲的研究。 3.2 Creating Your First…