xxAtrain223 / EmbMessenger

Command based communication library for embedded devices.
MIT License
2 stars 1 forks source link

Store Command Function Pointers in Program Memory #8

Closed xxAtrain223 closed 4 years ago

xxAtrain223 commented 4 years ago

Command Function Pointers can be stored in Program Memory to free up SRAM and allow for more commands on the device.

Example Usage:

const PROGMEM CommandFunction commands[] = {
    Command_get_adaptor,
    Command_set_adaptor,
    all_stop
};
SerialBuffer<64> buffer(&Serial);
emb::device::EmbMessenger<0> myMessenger(&buffer, commands, millis);