{"id":16517046,"url":"https://github.com/tomtzook/hal","last_synced_at":"2026-06-07T03:32:52.940Z","repository":{"id":158218478,"uuid":"144055727","full_name":"tomtzook/hal","owner":"tomtzook","description":"An hardware abstraction layer for hardware IO","archived":false,"fork":false,"pushed_at":"2024-07-18T19:52:11.000Z","size":620,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-13T06:41:56.638Z","etag":null,"topics":["c","hal","input-output"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomtzook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-08-08T18:56:51.000Z","updated_at":"2024-07-16T19:33:37.000Z","dependencies_parsed_at":"2024-07-16T23:27:30.190Z","dependency_job_id":"8e83b1bc-74fe-4377-9913-10606ee2193b","html_url":"https://github.com/tomtzook/hal","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/tomtzook%2Fhal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtzook%2Fhal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtzook%2Fhal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtzook%2Fhal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomtzook","download_url":"https://codeload.github.com/tomtzook/hal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241559268,"owners_count":19982235,"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":["c","hal","input-output"],"created_at":"2024-10-11T16:28:23.923Z","updated_at":"2025-11-30T09:03:55.177Z","avatar_url":"https://github.com/tomtzook.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HAL\n\nA basic abstraction layer for Hardware IO, such as GPIO, PWM and more. The actual implementation is provided in the form of _BACKENDS_, each providing different functionalities and supporting different hardware platform (e.g. Raspberry PI, Beaglebone Black, etc.).\n\nThe following are the available backends:\n- `bbb-usermode-sysfs`: a usermode implementation using sysfs for Beaglebone Black.\n\nAvailable for use in native code or with Java via JNI bindings.\n\n## Usage\n\n#### Basic Example LED\n\n```c\n#include \u003chal.h\u003e\n\nint main() {\n    hal_env_t* env;\n    hal_error_t status;\n    \n    status = hal_init(\u0026env);\n    if (HAL_IS_ERROR(status)) {\n        return 1;\n    }\n\n    hal_handle_t handle;\n    status = hal_open(env, \"P8_12\", HAL_TYPE_DIGITAL_OUTPUT, \u0026handle);\n    if (HAL_IS_ERROR(status)) {\n        goto end;\n    }\n    \n    for (int i = 0; i \u003c 5; i++) {\n        status = hal_dio_set(handle, HAL_DIO_HIGH);\n        if (HAL_IS_ERROR(status)) {\n            goto end;\n        }\n        \n        usleep(10000);\n        \n        status = hal_dio_set(handle, HAL_DIO_LOW);\n        if (HAL_IS_ERROR(status)) {\n            goto end;\n        }\n        \n        usleep(10000);\n    }\nend:\n    hal_shutdown(env);\n    return status;\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomtzook%2Fhal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomtzook%2Fhal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomtzook%2Fhal/lists"}