tobanteembedded / tetl Goto Github PK
View Code? Open in Web Editor NEWEmbedded template library.
License: Boost Software License 1.0
Embedded template library.
License: Boost Software License 1.0
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.