Giter Site home page Giter Site logo

tobanteembedded / tetl Goto Github PK

View Code? Open in Web Editor NEW
18.0 18.0 2.0 6.13 MB

Embedded template library.

License: Boost Software License 1.0

C++ 98.21% CMake 0.92% Makefile 0.11% Python 0.75% Shell 0.01%
cpp cpp20 cpp23 cpp26 embedded header-only stl template-library

tetl's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

baajarmeh sarvex

tetl's Issues

Coroutines support

Thank you for the such library. Do you have any plans for supporting the C++20 coroutines?
Probably, you can use a kind of cppcoro fork with the embedded systems specific optimizations.
I guess, that their concept of scheduling coroutine in a specific execution context ( schedule_on method) can be used with a RTOS wrapper for combining the facilities if a RTOS with the executors concept.

For instance, an embedded application can include a network thread, a kind of UI thread and peripheral thread for some sensors interaction. Just imagine a case when an embedded developer will be given for an opportunity for writing a code like a:

cppcoro::task<> typical_embedded_procedure()
{
auto sensor_value = co_await schedule_on(peripheral_executor, read_data_from_a_sensor); //will use DMA access internally
co_await schedule_on(network_executor, send_value_to_ble_peripheral(sensor_value));
co_yield ui_executor;
auto ui_widget = get_gfx_control();
ui_widget->set_control_value(sensor_value);
}

I have a prototype which based on a such idea. I've used the coroutines internally for the seamless integration with the Nordic SPI DMA.
It's available there:

https://wandbox.org/permlink/y6s7UVqLQUBy67xK
If you want, I'll advise you to take a glance at the article:
https://habr.com/ru/post/566070/
It was written in Russian, but the code examples had been supplied with comments.

Thank you again. If necessary, I'll open for the discussion about the further ideas of the library!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.