2014年4月3日 星期四

[版本更新至 1.36 ] Raspberry Pi - BCM2835 C 語言函式庫


[2014/04/03] bcm2835 版本更新至 1.36

1.36 Make automake's test runner detect that we're skipping tests when not root, the second one makes us skip the test when using fakeroot (as used when building Debian packages). Contributed by Guido Günther.

1.35 Fix build errors when compiled under Qt. Also performance improvements with SPI transfers. Contributed by Udo Klaas.

1.34 Added bcm2835_i2c_write_read_rs() which writes an arbitrary number of bytes, sends a repeat start, and reads from the device. Contributed by Eduardo Steinhorst.

1.33 Added command line utilities i2c and gpio to examples. Contributed by Shahrooz Shahparnia.

1.32 Added option I2C_V1 definition to compile for version 1 RPi. By default I2C code is generated for the V2 RPi which has SDA1 and SCL1 connected. Contributed by Malcolm Wiles based on work by Arvi Govindaraj.

1.31 Fix a GCC warning about dummy variable, patched by Alan Watson. Thanks.

1.30 10 microsecond delays from bcm2835_spi_transfer and bcm2835_spi_transfern for significant performance improvements, Patch by Alan Watson.

1.29 Further fix to SPI from Peter Würtz.

1.28 Fixed a problem where bcm2835_spi_writenb() would have problems with transfers of more than 64 bytes dues to read buffer filling. Patched by Peter Würtz.

1.27 bcm2835_gpio_set_pad() no longer needs BCM2835_PAD_PASSWRD: it is now automatically included. Added suport for PWM mode with bcm2835_pwm_* functions.

1.26 Added missing unmapmem for pads in bcm2835_close to prevent a memory leak. Reported by Hartmut Henkel.





[2013/06/17] bcm2835 版本更新至 1.25

1.25 Updated author and distribution location details to airspayce.com

1.24 Mark Dootson p[atched a problem with his previously submitted code under high load from other processes.

1.23 Added bcm2835_i2c_set_baudrate and bcm2835_i2c_read_register_rs. Improvements to bcm2835_i2c_read and bcm2835_i2c_write functions to fix ocasional reads not completing. Patched by Mark Dootson.




[2013/03/07] bcm2835 版本更新至 1.22

1.23 Added bcm2835_i2c_set_baudrate and bcm2835_i2c_read_register_rs. Improvements to bcm2835_i2c_read and bcm2835_i2c_write functions to fix ocasional reads not completing. Patched by Mark Dootson.


[2013/02/27] bcm2835 版本更新至 1.21

安裝方法:
先上官網看最新的版本,例如現在最新的版本為 1.xx

pi@raspberrypi ~ $ cd
pi@raspberrypi ~ $ wget http://www.open.com.au/mikem/bcm2835/bcm2835-1.xx.tar.gz
pi@raspberrypi ~ $ tar zxvf bcm2835-1.xx.tar.gz
pi@raspberrypi ~ $ cd bcm2835-1.xx/
pi@raspberrypi ~/bcm2835-1.xx $ ./configure
pi@raspberrypi ~/bcm2835-1.xx $ make
pi@raspberrypi ~/bcm2835-1.xx $ make check
pi@raspberrypi ~/bcm2835-1.xx $ sudo make install



說明:

Line 1:單獨輸入 cd 表示回到 Home 目錄下,/home/pi

Line 2:下載 bcm2835-1.xx.tar.gz,可以上 C library for Broadcom BCM 2835 as used in Raspberry Pi/ 查看並下載最新版本

Line 4:解壓縮檔案;指令完成後會在目錄下產生 bcm2835-1.xx

Line 6:進入 bcm2835-1.xx 目錄下

Line 7:執行 configure 主要是確認系統中的函式庫是否符合此軟體需求,若找不到貨式版本太低時,就會產生錯誤訊息並結束程式,這時就必須要上網下載相關的的函式庫下來安裝,再重新執行 configure 確認一次,確認通過後,configure 就會自動產生 Makefile,才能做接下來的程式編譯

Line 9:進行程式編譯

Line 11:安裝之前對環境以及來源程式碼等進行檢測以確保編譯安裝正確

Line 13:進行 bcm2835 函式庫安裝


[2012/12/06 更新]:增加 bcm2835 函式庫使用範例
如果想知道如何使用本網頁所介紹的 C 語言函式庫,可以參考下面連結網頁中 "Raspberry Pi 使用 595 說明" 一節,使用 595 晶片控制 8 顆 Led 做跑馬燈

IO 擴充應用 - 使用 74HC595 (三態輸出八位元移位暫存器 IC)

所介紹的這個 C 函式庫提供了存取 Broadcom BCM2835 晶片 GPIO 和其他 IO 功能的能力,允許存取在 Raspberry Pi (樹莓派,簡稱 Pi) 上的 P1 (26-pin),來控制或作為其它外部裝置的介面。

此函式庫提供讀取數位輸入和設定數位輸出的功能,各接腳事件的偵測支援使用輪詢(polling)的方法,但不支援中斷。

如果有需要用 C (C++ 也相容) 語言在 Pi 裡作開發,這網站裡的 C 函式庫是一個選擇,可以試試!

需要更詳細的內容請連到下面所提供連結:

C Library for Broadcom BCM2835 as used in Raspberry Pi



1 則留言: