I dont know if this is possible, but help give suggestions.
I have a variableunsigned char Var_2_insert; and I have an array const unsigned char insert_here[4];.
This variable is initialized at run time say var_2_insert = 225;. The idea is that index 3 in the array should have the value of var_2_insert always. So I want to try something like
insert_here[4] = { 0x00, 0x02, 0x03, Var_2_insert};
So that any time I try to read the array insert here, It will have the present value of var_2_insert. Now I know if I go like this:
#define Var_2_insert 225
This will go well, but since this variable has to be updated at runtime, I tried
#define _VAR Var_2_insert
insert_here[4] = { 0x00, 0x02, 0x03, _VAR};
But does not work. So how can i go about this? I hope my question is clear enough.
Thanks.