摘要: 安装mosquitto下载源代码包 wget http://mosquitto.org/files/source/mosquitto-1.5.tar.gz 解压 tar zxfv mosquitto-1.5.tar.gz 进入目录 cd mosquitto-1.5 编... 阅读全文
posted @ 2018-08-08 22:21 feiwatson 阅读(524) 评论(0) 推荐(0) 编辑
摘要: Linux I2C 驱动结构i2c体系结构由三部分组成i2C core i2c core提供了i2c 总线驱动 和 设备驱动的注册,注销方法 i2C and SMBus protocol 实现i2C “bus” driver algorithm driver adap... 阅读全文
posted @ 2018-08-03 21:26 feiwatson 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 使用 /proc 文件系统来访问 Linux 内核的内容https://www.ibm.com/developerworks/cn/linux/l-proc.html /proc 文件系统并不是 GNU/Linux 系统中的惟一一个虚拟文件系统。在这种系统上,sys... 阅读全文
posted @ 2018-08-01 22:04 feiwatson 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 转一个挺不错的文章使用 /sys 文件系统访问 Linux 内核https://www.ibm.com/developerworks/cn/linux/l-cn-sysfs/ 如果你正在开发的设备驱动程序中需要与用户层的接口,一般可选的方法有: 注册虚拟的字符... 阅读全文
posted @ 2018-08-01 21:27 feiwatson 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 通过wiringPi等library, 在user space 通过/dev/i2c来读写i2c设备的方案不在本文讨论了。编译SENSORS_PCF8591 模块在Default raspberryPi的内核中,pcf591模块是没有编译的。查看drivers\hwm... 阅读全文
posted @ 2018-07-31 15:06 feiwatson 阅读(1002) 评论(0) 推荐(0) 编辑
摘要: 上文中的代码通过wiringPi的API调用devfs API来显示图片。 这里分析的Python代码也通过类似的方法来显示图片。主要用到了两个Library.import spidev import RPi.GPIO as GPIORPi.GPIO在 https:/... 阅读全文
posted @ 2018-07-22 16:35 feiwatson 阅读(334) 评论(0) 推荐(0) 编辑
摘要: 在上文中,分析了wiringPi 的oled demo是使用devfs来控制spi master和spi slave通讯。 https://blog.csdn.net/feiwatson/article/details/81149028再详细分析一下demo的OLED... 阅读全文
posted @ 2018-07-21 21:37 feiwatson 阅读(477) 评论(0) 推荐(0) 编辑
摘要: 硬件SPI0,CE0 SPI Master Driver设备树arch\arm\boot\dts\bcm2710-rpi-3-b.dts&gpio { spi0_pins: spi0_pins { brcm,pins = ; brcm... 阅读全文
posted @ 2018-07-21 20:57 feiwatson 阅读(456) 评论(0) 推荐(0) 编辑
摘要: 上文中讨论了通过sysfs来实例化i2c设备 (rtc ds3231) https://blog.csdn.net/feiwatson/article/details/81048616本文继续看看如何通过 DeviceTree Overlays来实例化rtc ds32... 阅读全文
posted @ 2018-07-16 22:17 feiwatson 阅读(738) 评论(0) 推荐(0) 编辑
摘要: 硬件平台RaspberryPi-3B+Pioneer600外扩版i2c芯片为DS3231,adddress 0x68首先来看一下i2ctool的使用i2ctool 使用https://i2c.wiki.kernel.org/index.php/I2C_Tools ht... 阅读全文
posted @ 2018-07-14 23:19 feiwatson 阅读(656) 评论(0) 推荐(0) 编辑