RTC_DATA_ATTR std::deque
Posted: Thu Oct 25, 2018 7:06 pm
I'm trying to maintain a std::deque in slow memory (between sleeps) that is only initialized once. I wrote a small test program that declares the following (In Arduino IDE):
I expected to see the _queue.size() to increment between sleep cycles; however, the queue size stays at 1. Is it possible to put dynamic structures into RTC?
Code: Select all
RTC_DATA_ATTR std::deque<int> _queue;
setup() {
// serial setup....
_queue.push_back(100);
Serial.println(_queue.size());
esp_sleep_enable_timer_wakeup(5 * uS_TO_S_FACTOR);
esp_deep_sleep_start();
}