原创 樹莓派 -- 輸入設備驅動 (key) 續1

測試 安裝 input-utils pi@raspberrypi:~ $ sudo apt-get install input-utils Reading package lists... Done Building depen

原创 樹莓派 -- 輸入設備驅動 (key)

輸入設備(如按鍵,鍵盤,觸摸屏等)是典型的字符設備,其一般工作原理是底層在按鍵或觸摸等動作發生時產生一箇中斷,然後CPU通過SPI,I2C總線讀取鍵值。 在這些工作中之後中斷和讀鍵值是與設備相關的,而輸入事件的緩衝區管理,字符設

原创 藍牙bluez學習(1) Stack Architecture

Bluez支持的features Core Specification 4.2 (GAP, L2CAP, RFCOMM, SDP, GATT) Classic Bluetooth (BR/EDR) Bluetooth Smar

原创 藍牙學習 (8)配對raspberryPi和SensorTag CC2650

在上一篇中,用raspberryPi能夠掃描到Ti SensorTag. 但是沒有獲得更多的數據,並且發現sensor Tag並沒有回覆scan request。 https://blog.csdn.net/feiwatson/a

原创 樹莓派 - 通過sysfs操控GPIO

點亮或熄滅LED硬件上,一個LED燈接在pi的Pin-25.  該引腳爲BCM的GPIO26$ gpio readall +-----+-----+---------+------+---+---Pi 3---+---+------+-

原创 leds-gpio driver 續1

在上文中分析了gpio-led platform_device是如何定義並註冊的。 那麼gpio-led platform_device 和 gpio-led platform_driver是如何匹配的呢 我們還是先分析prob

原创 樹莓派 -- 按鍵 (key)使用BCM2835 gpio library

BCM2835 GPIO library介紹 This is a C library for Raspberry Pi (RPi). It provides access to GPIO and other IO func

原创 樹莓派 - platform總線,設備和驅動

以樹莓派爲例子,分析一下其中LED的 platform device 和 platform driver.查看LED設備,被掛載在/sys/devices/platform下。注意其中的driver指向, driver -> ../../

原创 樹莓派 - RPi.GPIO

RPi.GPIO是通過Python/C API實現的,C代碼操作底層寄存器, python通過Python/C API調用這些C接口。這是關於RPi.GPIO項目的介紹。 其中提到了有python 垃圾回收機制,並不適合於實時要求的應用。

原创 樹莓派 -- bcm2835 library (1)

bcm2835 library提供了user space 操作IO的代碼。本文不涉及代碼分析,先直觀的按照user guide完成操作。1. 在Raspberry中安裝bcm2835 library2. build LED test3.

原创 樹莓派 - wiringPi

wiringPi其實和BCM2835 library類似,也是通過memmap, IOmap來實現在用戶空間直接操作底層寄存器wiringPihttp://wiringpi.com/WiringPi is a PIN based GPIO

原创 樹莓派 - gpio-led platform driver 控制LED

樹莓派3b板上有兩個LED, pwr (power) 和 act (activity)。是platform_driver gpio-led驅動。 可以通過設備樹和gpio-led來額外控制一個LED。如下圖在P25和GND之間接入一個發光

原创 樹莓派--bcm2835 library (2) 交叉編譯BCM2835

在上文中,按照guide, 在樹莓派目標板上install bcm2835.因爲bcm2835是用戶空間應用,所以可以在宿主機上交叉編譯,生成binary後在樹莓派執行按照guide: InstallationThis library c

原创 leds-gpio driver

我們還是先看看platform device是如何define的 platform device 是如何定義的 example1 在板級驅動中定義, 通過platform_add_devices()函數將這個platform

原创 使用CSDN-markdown編輯器

歡迎使用Markdown編輯器寫博客 本Markdown編輯器使用StackEdit修改而來,用它寫博客,將會帶來全新的體驗哦: Markdown和擴展Markdown簡潔的語法 代碼塊高亮 圖片鏈接和圖片上傳 LaTex數學公