smplque
Container class with FIFO queue structure.
template <typename T, int N, class Intr> smplbuf_local
template <typename T, class Intr> smplbuf_attach
template <typename T, class Intr> smplbuf_heapvoid some_func() {
// alloc locally
smplque_local<uint8_t, 128> q1;
// attach to existing buffer
uint8_t buf[128];
smplque_attach<uint8_t> q2;
// alloc from the HEAP
smplque_heap<uint8_t> q3;
void setup() {
// Globally defined objects are initialized with setup()
q1.init_local();
q2.attach(buf, 128);
q3.init_heap(128);
}
void some_func() {
// Local definition of smplque_local can omit init_local()
smplque_local<uint8_t, 128> q_local;
..
}
}Declaration and initialization
Methods
push(), pop(), front(), back()
empty(), size(), is_full()
clear()
operator []
Iterator
最終更新