> That solution wastes variables and is generally pretty ugly.
> I still hope we can find a better solution.

You can't.  C doesn't work that way.
Your choices are to use a fixed-size array or to
declare helper arrays as you have already done.
You can use string literals as aliases for helper
arrays, but that's probably even worse.

#define JEDEC_WREN "\x06"
#define JEDEC_SE "\x20"

... cmds[] = {
    { .writearr = (uchar*)(JEDEC_WREN) },
    { .writearr = (uchar*)(JEDEC_SE "\x01\x23\x45") },
    ...
}

If that's enough to turn your stomach, then your
only remaining alternative is to write a program to
generate the code for you using helper arrays.

Russ

Reply via email to