I have the following structure:
struct inst_t {
const char *s1;
const char *s2;
};
I'd like to initialize a constant array of this structure like this where all the strings are PROGMEM
'ed:
const char START[] PROGMEM = "START";
const char ATZ[] PROGMEM = "ATZ";
const char ATE0[] PROGMEM = "ATE0";
const char OK[] PROGMEM = "OK";
static inst_t insts[] = {
{ START, NULL },
{ ATZ, OK },
{ ATE0, OK }
};
You can see there is a lot of duplication here though. Is there anyway way I can inline the PROGMEM
strings directly into this array initialization without separately declaring each string as being in PROGMEM
?