libpruw1 (BeagleBone one wire driver using GPIO)

Headers, Bindings, Libraries for use with FreeBASIC, Please include example of use to help ensure they are tested and usable.
Post Reply
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°

libpruw1 (BeagleBone one wire driver using GPIO)

Post by TJF »

The libpruw1 library project provides a hardware driver for
  • a one wire (W1) bus for AM335x micro processors,
  • designed for Beaglebone hardware, providing
  • configuration any GPIO as W1 bus (without additional hardware), for
  • sending digital output and receiving digital input from the bus,
  • logging the bus data line state for monitoring purposes,
  • supporting parasite power mode.
libpruw1 software is running on the host (ARM) and in parallel on a Programmable Realtime Unit SubSystem (= PRUSS or just PRU) for accurate bus timing. It depends on libpruio (>= 0.6). In contrast to the kernel driver it supports simultaneuos measurements on a multi sensor/devices bus.

The driver provides functions to
  • scan the bus for all device IDs,
  • send a single byte or a block of eight bytes to the bus,
  • receive a single byte or a block of bytes from the bus,
  • calculate the CRC checksum for a block of data, and
  • compute the temperature in °C (centigrade) from Dallas sensors (types &h10, &h20, &h22, &h28, &h3B or &h42).
The libpruw1 project is hosted at GitHub. It's developed and tested on a Beaglebone Black under Debian Image 2014-08-05. It should run on all Beaglebone platforms with Debian based LINUX operating system. It's compiled by the FreeBasic compiler. A wrapper for C programming language is included.

Find more information in the online documentation at ... /doc/html/

and find the source code at containing
  • the library source (FB and PASM code)
  • Example code (FB and C code)
  • the documentation (in-source Doxygen code)
Post Reply