smplbuf
template <typename T, int N> smplbuf_local
template <typename T> smplbuf_attach
template <typename T> smplbuf_heap// Array area is a fixed array of class member variables
smplbuf_local<uint8_t, 128> b1;
// Refer to buffer memory that already exist
uint8_t buf[128];
smplbuf_attach<uint8_t> b2;
// Allocate buffer memory at heap
smplbuf_heap<uint8_t> b3;
// Initialize (must do initlialize at setup() for global objects)
void setup() {
b1.init_local();
b2.attach(buf, 0, 128);
b3.init_heap(128);
}
// In some function
void some_func() {
smplbuf_local<uint8_t, 128> bl;
// bl.init_local(); // It can omit if smplbuf_local is declared locally.
bl.push_back('a');
}Declaration, Initialize
List of initializers
Methods
append(), push_back(), pop_back()
empty(), size(), capacity()
reserve(), reserve_head(), redim()
operator []
Output to mwx::stream
<< operator
to_stream()
Data generation with `mwx::stream
最終更新