随笔分类 - Linux
摘要:**proto_ops:**该结构体包含了某个特定的“protocol family"的一系列functions。 其包含的functions和struct proto很类似,但是其在socket层 (见下图中1的位置)。例如,inet_stream_ops...
阅读全文
摘要:Frames由下图可以看出 - SDU由多个I-frames中的Information Payload组成 - 一个I-frames又拆分成多个HCI data payloadsocket bufferssk_buff, 套接字缓冲区,在linux网络子系统中的各...
阅读全文
摘要:L2CAP in protocol首先看一下L2CAP在Bluetooth protocol architecture diagram中的位置: Features of L2CAPLogical Link Control and Adaptation Protocol...
阅读全文
摘要:在上文,https://blog.csdn.net/feiwatson/article/details/81712933中主要理解了在Kernel中USB adapter是如何实现USB设备驱动,以及HCI数据是通过不同的pipes和host通信的。Control p...
阅读全文
摘要:主要分析一下蓝牙USB Adapter使用USB接口传输HCI包的实现及过程。 参照上面的Bluetooth core system architecture图, 蓝牙USB Adapter作为Bluetooth controller以USB的物理形式连接到Linux...
阅读全文
摘要:Bluez支持的featuresCore Specification 4.2 (GAP, L2CAP, RFCOMM, SDP, GATT) Classic Bluetooth (BR/EDR)Bluetooth Smart (Low Energy)Audi...
阅读全文
摘要:安装mosquitto下载源代码包 wget http://mosquitto.org/files/source/mosquitto-1.5.tar.gz 解压 tar zxfv mosquitto-1.5.tar.gz 进入目录 cd mosquitto-1.5 编...
阅读全文
摘要:Linux I2C 驱动结构i2c体系结构由三部分组成i2C core i2c core提供了i2c 总线驱动 和 设备驱动的注册,注销方法 i2C and SMBus protocol 实现i2C “bus” driver algorithm driver adap...
阅读全文
摘要:使用 /proc 文件系统来访问 Linux 内核的内容https://www.ibm.com/developerworks/cn/linux/l-proc.html /proc 文件系统并不是 GNU/Linux 系统中的惟一一个虚拟文件系统。在这种系统上,sys...
阅读全文
摘要:转一个挺不错的文章使用 /sys 文件系统访问 Linux 内核https://www.ibm.com/developerworks/cn/linux/l-cn-sysfs/ 如果你正在开发的设备驱动程序中需要与用户层的接口,一般可选的方法有: 注册虚拟的字符...
阅读全文
摘要:通过wiringPi等library, 在user space 通过/dev/i2c来读写i2c设备的方案不在本文讨论了。编译SENSORS_PCF8591 模块在Default raspberryPi的内核中,pcf591模块是没有编译的。查看drivers\hwm...
阅读全文
摘要:上文中的代码通过wiringPi的API调用devfs API来显示图片。 这里分析的Python代码也通过类似的方法来显示图片。主要用到了两个Library.import spidev import RPi.GPIO as GPIORPi.GPIO在 https:/...
阅读全文
摘要:在上文中,分析了wiringPi 的oled demo是使用devfs来控制spi master和spi slave通讯。 https://blog.csdn.net/feiwatson/article/details/81149028再详细分析一下demo的OLED...
阅读全文
摘要:硬件SPI0,CE0 SPI Master Driver设备树arch\arm\boot\dts\bcm2710-rpi-3-b.dts&gpio { spi0_pins: spi0_pins { brcm,pins = ; brcm...
阅读全文
摘要:上文中讨论了通过sysfs来实例化i2c设备 (rtc ds3231) https://blog.csdn.net/feiwatson/article/details/81048616本文继续看看如何通过 DeviceTree Overlays来实例化rtc ds32...
阅读全文
摘要:硬件平台RaspberryPi-3B+Pioneer600外扩版i2c芯片为DS3231,adddress 0x68首先来看一下i2ctool的使用i2ctool 使用https://i2c.wiki.kernel.org/index.php/I2C_Tools ht...
阅读全文
摘要:使用device-tree (DT) overlay应该是更方便的方法:http://blog.gegg.us/2017/01/setting-up-a-gpio-button-keyboard-on-a-raspberry-pi/Back in late 2013,...
阅读全文
摘要:测试 安装 input-utilspi@raspberrypi:~ $ sudo apt-get install input-utilsReading package lists... DoneBuilding dependency tree Readin...
阅读全文
摘要:输入设备(如按键,键盘,触摸屏等)是典型的字符设备,其一般工作原理是底层在按键或触摸等动作发生时产生一个中断,然后CPU通过SPI,I2C总线读取键值。 在这些工作中之后中断和读键值是与设备相关的,而输入事件的缓冲区管理,字符设备驱动的file_operations接...
阅读全文
摘要:BCM2835 GPIO library介绍 This is a C library for Raspberry Pi (RPi). It provides access to GPIO and other IO functions on the Broadco...
阅读全文

浙公网安备 33010602011771号