{"id":16991649,"url":"https://github.com/pstolarz/librasp","last_synced_at":"2025-04-12T03:31:33.264Z","repository":{"id":41076944,"uuid":"45838416","full_name":"pstolarz/librasp","owner":"pstolarz","description":"Raspberry Pi library for GPIO, 1-Wire, SPI, System Time Counter (STC) access. There have been provided APIs for handling various popular devices.","archived":false,"fork":false,"pushed_at":"2023-01-24T08:04:13.000Z","size":188,"stargazers_count":21,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-25T23:24:38.836Z","etag":null,"topics":["dallas-family","dht-temperature-sensors","dht11","dht22","ds18b20","embedded","embedded-systems","gpio","hc-sr04","i2c","library","nrf24l01","one-wire","piso-shift-register","raspberry","raspberry-pi-library","sensor","spi","stc","temperature-sensor"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pstolarz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-09T13:07:03.000Z","updated_at":"2024-09-23T21:52:32.000Z","dependencies_parsed_at":"2023-02-13T19:05:42.892Z","dependency_job_id":null,"html_url":"https://github.com/pstolarz/librasp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pstolarz%2Flibrasp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pstolarz%2Flibrasp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pstolarz%2Flibrasp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pstolarz%2Flibrasp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pstolarz","download_url":"https://codeload.github.com/pstolarz/librasp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248512688,"owners_count":21116660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dallas-family","dht-temperature-sensors","dht11","dht22","ds18b20","embedded","embedded-systems","gpio","hc-sr04","i2c","library","nrf24l01","one-wire","piso-shift-register","raspberry","raspberry-pi-library","sensor","spi","stc","temperature-sensor"],"created_at":"2024-10-14T03:26:46.799Z","updated_at":"2025-04-12T03:31:32.753Z","avatar_url":"https://github.com/pstolarz.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"librasp\n=======\n\nRaspberry Pi library for GPIO, 1-Wire, SPI, System Time Counter (STC) access.\nAs an example of usage there have been provided APIs for handling various\npopular devices like wireless nRF24L01 transceiver, DHT temperature sensors\n(DHT11/22), Dallas family of temperature sensors (e.g. DS18B20, DS1822, DS1825),\nHC-SR04 distance sensor, PISO shift register...\n\nAPI specification contained in the library headers (see [`src/inc/librasp`](src/inc/librasp)).\nFor examples look in [`examples`](examples).\n\nNOTE: 1-wire and SPI API bases on generic Linux interfaces (`ioctl(2)`, `netlink(3)`)\nand doesn't relay on any RPi platform specific details. For this reason the\n1-wire and SPI services may be used on any embedded Linux platform (e.g.\n[`dsth_list`](examples/dsth_list.c) and [`dsth_list2`](examples/dsth_list2.c)\nexamples may be used to read-out connected Dallas sensors).\n\nCompilation\n-----------\n\n    make\n\nproduces static library `src/librasp.a` which may be linked into an application.\n\n    make examples\n\nwill compile examples.\n\nThere is possible to cross-compile the library by setting `CROSS_COMPILE` (for\nthe project `Makefile`) to the tool-chain prefix:\n\n    CROSS_COMPILE=\u003ctool-chain-prefix\u003e make\n\n1-wire and parasite powering\n----------------------------\n\nThe original Linux kernel 1-wire driver (the `wire` module) doesn't provide\nproper interface for parasite powering of 1-wire slaves via userland's netlink\nprotocol.\n\n1. To handle this issue there has been provided a patch for the kernel allowing\n   the library to fully support the parasite mode. Look in [`src/kernel`](src/kernel)\n   directory for more info.\n\n2. Configure the library with `CONFIG_WRITE_PULLUP` parameter while building\n   the library (see [`src/config.h`](src/config.h) header for details).\n\n3. RPi uses `w1-gpio` module as a 1-wire bus master driver. The driver needs\n   to be configured to support bit-banged strong pull-up on the data wire,\n   required for parasite powering of the connected slaves. Add the following\n   line in `/boot/config.txt` to turn it on via the device-tree overlay (reboot\n   is required):\n\n    `dtoverlay=w1-gpio,pullup=on`\n\n   NOTE: This step is not required when using [`w1-gpio-cl`](https://github.com/pstolarz/w1-gpio-cl)\n   driver instead of `w1-gpio`.\n\n   To reach for the full power of the library, it is **strongly recommended**\n   to use the `w1-gpio-cl` driver instead of the standard one. The primary\n   benefit is support for more than one bus master simultaneously and much\n   more mature parasite powering handling. See the above link for more\n   details.\n\nRefer `examples/dsth_list*` samples for details on probing the parasite\npowered Dallas family of temperature sensors.\n\nLicense\n-------\n\n2 clause BSD license. See [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpstolarz%2Flibrasp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpstolarz%2Flibrasp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpstolarz%2Flibrasp/lists"}