C++ Standard Template Library with ESP32?

GeorgeFlorian1
Posts: 160
Joined: Thu Jan 31, 2019 2:32 pm

C++ Standard Template Library with ESP32?

Postby GeorgeFlorian1 » Thu Mar 21, 2019 11:14 am

Good afternoon !

I am trying to make some sort of circular stack that should let me add an element at the top, read elements from top to bottom, and eliminate (only when the stack is full) the element at the bottom.
In this regard I thought of adding the C++ Standard Template Library to my code so that I can use a Deque.

The only template library I found was
Embedded Template Library by John Wellbelove
on PlatformIO IDE, but it seems discontinued as the last update was over a year ago and it has very few downloads in the last month (31).

Should I trust this library or is there a way of adding the C++ STL to Arduino IDE or PlatformIO IDE ?

Thank you !

ESP_igrr
Posts: 2071
Joined: Tue Dec 01, 2015 8:37 am

Re: C++ Standard Template Library with ESP32?

Postby ESP_igrr » Thu Mar 21, 2019 12:26 pm

(assuming the question is about ESP32 Arduino)
You should be able to use STL containers: #include <deque>, then use std::deque.

idahowalker
Posts: 166
Joined: Wed Aug 01, 2018 12:06 pm

Re: C++ Standard Template Library with ESP32?

Postby idahowalker » Thu Mar 21, 2019 3:31 pm

Now just writing, if you want a queue freeRTOS might work for you?

Who is online

Users browsing this forum: Baidu [Spider] and 66 guests