Advanced data types for micro-controllers. The primary objective is to enhance the ease of data management, while addressing the limitations of micro-controllers. The library aims for an interface similar to stdlib.
Deque
— a double ended queue.Vector
— a dynamic array with static capacity.RingBuffer
— a ring buffer compatible with Arduino'sStream
interface.
In list types, methods for getting iterators (such as begin()
and end()
) are available.
The use of iterators is similar to what you are used to:
template <typename T>
int indexOfDequeItem(const T& item, const Deque<T>& list) {
for (auto it = list.begin(); it != list.end(); it++) {
if (*it == item) {
return it - list.begin();
}
}
return -1;
}