{"id":22113753,"url":"https://github.com/markuspi/cppfreertos","last_synced_at":"2025-03-24T04:44:34.012Z","repository":{"id":265870947,"uuid":"861362377","full_name":"markuspi/cppfreertos","owner":"markuspi","description":"A FreeRTOS C++ wrapper for ESP32","archived":false,"fork":false,"pushed_at":"2024-09-30T21:13:45.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T07:13:19.301Z","etag":null,"topics":["cpp","esp32","freertos","platformio"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markuspi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2024-09-22T17:34:56.000Z","updated_at":"2024-09-30T21:13:49.000Z","dependencies_parsed_at":"2024-12-01T10:16:37.869Z","dependency_job_id":null,"html_url":"https://github.com/markuspi/cppfreertos","commit_stats":null,"previous_names":["markuspi/cppfreertos"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markuspi%2Fcppfreertos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markuspi%2Fcppfreertos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markuspi%2Fcppfreertos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markuspi%2Fcppfreertos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markuspi","download_url":"https://codeload.github.com/markuspi/cppfreertos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245212136,"owners_count":20578440,"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":["cpp","esp32","freertos","platformio"],"created_at":"2024-12-01T11:05:52.501Z","updated_at":"2025-03-24T04:44:33.992Z","avatar_url":"https://github.com/markuspi.png","language":"C++","readme":"# cppfreertos\n\nA FreeRTOS C++ wrapper for ESP32. Compatible with PlatformIO and ESP-IDF.\n\n## Installation\n\n### PlatformIO\n\nIn your platformio.ini file, add this repository to `lib_deps`:\n\n```ini\n[env:some_env]\nplatform = espressif32\nframework = ...\nboard = ...\nlib_deps =\n    https://github.com/markuspi/cppfreertos.git#v0.1.3\n```\n\n### ESP-IDF\n\n[![Component Registry](https://components.espressif.com/components/markuspi/cppfreertos/badge.svg)](https://components.espressif.com/components/markuspi/cppfreertos)\n\nIn your component directory (either `main` or any other component in `components/\u003cname\u003e`), edit or create the `idf_component.yml` manifest file and add `markuspi/cppfreertos` as a dependency:\n\n```yaml\ndependencies:\n  markuspi/cppfreertos: \"^0.1.3\"\n```\n\nOr use the following command to add it to your project:\n\n```bash\nidf.py add-dependency \"markuspi/cppfreertos^0.1.3\"\n```\n\n## Usage Example\n\n```cpp\n#include \u003ccppfreertos/task.h\u003e\n#include \u003ccppfreertos/queue.h\u003e\n\n// define a queue of integers with a capacity of 5 items\ncppfreertos::StaticQueue\u003cint, 5\u003e myQueue;\n\n// define a task with 4096 bytes of stack size in static memory\ncppfreertos::StaticTask\u003c4096\u003e myTask([](){\n    int item;\n    while (true) {\n        if (myQueue.Receive(item, portMAX_DELAY)) {\n            std::printf(\"Received: %d\\n\", item);\n        }\n    }\n});\n\n// can also use void setup() { ... } for Arduino\nextern \"C\" void app_main() {\n    // initialize queue\n    myQueue.Init();\n\n    // initialize the task and start it right away\n    myTask.Init(\"MyTask\");\n\n    // add an item to the queue\n    myQueue.Send(123);\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkuspi%2Fcppfreertos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkuspi%2Fcppfreertos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkuspi%2Fcppfreertos/lists"}