{"id":21393418,"url":"https://github.com/kopera/erlang-spi","last_synced_at":"2026-05-19T17:11:47.878Z","repository":{"id":145473948,"uuid":"617062466","full_name":"kopera/erlang-spi","owner":"kopera","description":"An Erlang application for interfacing with SPI devices on Linux systems","archived":false,"fork":false,"pushed_at":"2023-03-21T23:08:22.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-23T12:18:22.513Z","etag":null,"topics":["embedded","erlang","linux","spi"],"latest_commit_sha":null,"homepage":null,"language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kopera.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-21T16:16:39.000Z","updated_at":"2023-03-28T09:46:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"2c2a7b1c-15fb-47cb-b789-4b1592def7c9","html_url":"https://github.com/kopera/erlang-spi","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kopera%2Ferlang-spi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kopera%2Ferlang-spi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kopera%2Ferlang-spi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kopera%2Ferlang-spi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kopera","download_url":"https://codeload.github.com/kopera/erlang-spi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243878494,"owners_count":20362433,"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":["embedded","erlang","linux","spi"],"created_at":"2024-11-22T14:11:40.964Z","updated_at":"2026-05-19T17:11:42.838Z","avatar_url":"https://github.com/kopera.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spi\n\nAn Erlang application for interfacing with SPI devices on Linux systems.\n\n# Setup\n\nYou need to add `spi` as a dependency to your project. If you are using\n`rebar3`, you can add the following to your `rebar.config`:\n\n```erlang\n{deps, [\n    {spi, \"0.5.0\"}\n]}.\n```\n\nAlso ensure that `spi` is added as a dependency to your application, by\nupdating your `.app.src` file:\n\n```erlang\n{application, my_app, [\n\n    {applications, [\n        kernel,\n        stdlib,\n\n        spi  % \u003c- You need this in your applications list\n    ]}\n]}.\n```\n\n# Usage\n\nThe following will open /dev/spidev0.0 using mode 0, at 10MHz using 8 bits per word:\n\n```erlang\n\u003e {ok, Device} = spi:open(\"/dev/spidev0.0\", #{\n    mode =\u003e 0,\n    speed_hz =\u003e 10000000,\n    bits_per_word =\u003e 8\n}).\n{ok, #Ref\u003c0.2893647232.3229876230.113792\u003e}\n```\n\nOnce the device is open you need to use `spi:transfer/2` to initiate a transfer.\nAlternatively `spi:read/2`, `spi:read/3`, `spi:write/2` and `spi:write/3` can\nalso be used for simple transfers.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkopera%2Ferlang-spi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkopera%2Ferlang-spi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkopera%2Ferlang-spi/lists"}