{"id":13812106,"url":"https://github.com/malachib/util.embedded","last_synced_at":"2025-05-14T21:32:27.698Z","repository":{"id":79968057,"uuid":"52069973","full_name":"malachib/util.embedded","owner":"malachib","description":"Useful support code for embedded development","archived":true,"fork":false,"pushed_at":"2022-03-29T07:32:55.000Z","size":591,"stargazers_count":5,"open_issues_count":7,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-19T07:38:35.504Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/malachib.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":"2016-02-19T07:33:13.000Z","updated_at":"2023-06-22T07:01:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"7d69c0d0-c0fc-4bec-a4f1-381ebf53118a","html_url":"https://github.com/malachib/util.embedded","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/malachib%2Futil.embedded","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malachib%2Futil.embedded/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malachib%2Futil.embedded/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malachib%2Futil.embedded/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/malachib","download_url":"https://codeload.github.com/malachib/util.embedded/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254231182,"owners_count":22036318,"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":[],"created_at":"2024-08-04T04:00:47.052Z","updated_at":"2025-05-14T21:32:22.673Z","avatar_url":"https://github.com/malachib.png","language":"C++","funding_links":[],"categories":["Common"],"sub_categories":[],"readme":"Util.Embedded\n=============\n\nLicensed under GPL v3\n\nBranches:\nmaster [![Build Status](https://travis-ci.org/malachib/util.embedded.svg?branch=master)](https://travis-ci.org/malachib/util.embedded)\ndev [![Build Status](https://travis-ci.org/malachib/util.embedded.svg?branch=dev)](https://travis-ci.org/malachib/util.embedded)\n\nOverview\n--------\n\n*THIS CODE BASE IS NO LONGER MAINTAINED.  SOME OF ITS FUNCTIONALITY HAS MIGRATED TO https://github.com/malachi-iot/estdlib*\n\nComprises reusable low-level functionality for use in your embedded and/or\ncross-platform endeavors.\n\nCode is Arduino, POSIX and mbed OS friendly.  Experimental support for ESP-OPEN-RTOS.\nPlays nice with PlatformIO\n\n* C++ iostream shims; use istream/ostream etc. without all the bloat\n* Circular buffer\n* Debug console: Menuing system for serial port (or other stream) control code to run diagnostics and acquire status\n    * Telnet capable (coming soon)\n* Linked lists, single and doubly linked\n\nNote Circular Buffer and its close relatives conform to the layer1-layer5 design\nas described later.  This could be critical for your small-footprint environment.\n\nExperimental:\n-------------\n\nFollowing code has worked to varying degrees but has not been tested for a while.\nCode in this category is more subject to breaking changes:\n\n* C#-like event code\n* Service objects facilitating start, stop and status querying\n * Canned MQTT Service for use with Adafruit's MQTT libraries (must define either MQTT_TYPE_WIFI or MQTT_TYPE_FONA).  Hard wired to either WiFi or FONA at this time\n * Canned Wifi Service for use with ESP8266 (must define MQTT_TYPE_WIFI)\n* Abstract driver layer (work in progress):\n * GNSS (GPS)\n* Hardware helper layer - strong effort put to be HAL-like, but no promises =)\n    * AVR\n        * power management\n        * sleep\n        * watchdog\n        * pin change interrupts\n    * SAM\n        * sleep (coming soon)\n\nObsolete:\n---------\n\nFollowing code worked at once time, but is now being put out to pasture.  If you\nseee it, don't use it:\n\n* Cross-thread RPC mechanism (if using an external threading tool)\n\n\nOther preprocessor defines\n--------------------------\n\n* FEATURE_IOSTREAM: configures POSIX iostreams to take precedence over our lightweight libs\n\n## Code paradigm:\n\n* layer 1: barest-metal, tends to be templates; buffer pointers avoided\n* layer 2: low-level.  buffer pointers often used.  size fields are templatized constants\n* layer 3: low-level.  buffer pointers and size fields used\n* layer 4: mid-level.  buffers inline (pointers avoided).  virtual functions allowed\n  * layer 4 is currently experimental and subject to change definition.\n* layer 5: mid-level.  buffer pointers used.  virtual functions allowed\n\nHardware Compatibility\n----------------------\n\nTested and works on the following:\n\nDevice           | Framework          | Features\n---------------- | ------------------ | --------\nATmega328P       | Arduino            |\nATmega32u4       | Arduino            | IOS, buffer\nATtiny85         | Arduino            |\nESP8266          | Arduino            |\nESP8266          | ESP-OPEN-RTOS      |\nATSAMD21G        | Arduino            | IOS\nATSAMD21G        | mbed OS            |\nSTM32F401RE      | mbed OS            | IOS\nx86              | POSIX              | IOS\n\nMost code in this lib is designed to work everywhere, so missing\nfeatures on this chart only represents that it is *untested* , not\nnecessarily *unavailable*.\n\nData/Memory code size\n---------------------\n\nI won't lie, these libraries take space.  There are a slew of #defines to help curb its appetite:\n\n* MEMORY_OPT: Trim memory by reducing internal buffers sizes and string descriptions\n * MEMORY_OPT_CODE: Trim code space by reducing size of string descriptions,\n   some debug/bounds code, and a few potentially less critical features\n * MEMORY_OPT_DATA: Trim data space by reducing various buffer sizes\n* CONSOLE_FEATURE_FULL: Enable all options for Console (enabled by default when\n  MEMORY_OPT_CODE is not enabled)\n * CONSOLE_FEATURE_AUTOCOMPLETE_COMMAND: Enable 'tab' key to auto-complete a menu\n   name in console mode\n * CONSOLE_FEATURE_COUT: Presently disabled by default, this switches Console code\n   from global singular-stream to Console managing its own private stream; useful\n   for multiple consoles speaking over different streams (i.e. Serial and telnet)\n* DRIVER_FEATURE_VTABLE_SUPPRESS: Disables virtual tables/polymorphism for drivers\n* EVENT_FEATURE_TYPE2: Force events to never operate in Type1 mode, only Type2.  \n   *May* save code space if using events heavily.\n\nNotes\n-----\n\nRemember, istream/ostream are (arguably) by design blocking I/O.  There is a lot of\ndiscussion about this on the internet.  So far I have done nothing to adjust or enhance\nthe FEATURE_IOSTREAM_SHIM to be async.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalachib%2Futil.embedded","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalachib%2Futil.embedded","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalachib%2Futil.embedded/lists"}