Skip to content
/ tinyadt Public

🍱 Advanced data types for micro-controllers.

License

Notifications You must be signed in to change notification settings

MyrtIO/tinyadt

Repository files navigation

TinyADT Quality Assurance

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.

Types

  • Deque — a double ended queue.
  • Vector — a dynamic array with static capacity.
  • RingBuffer — a ring buffer compatible with Arduino's Stream interface.

Iterators

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;
}