Is there a way to repeat CN code times with a macro? Also N is a macro.
For example, if I have these macros:
#define N 5
#define COODE "nop\n\t"
#define REPEAT [...]
When called again, the preprocessor writes CODE N times, so
__asm__(REPEAT);
has become
__asm__("nop\n\t""nop\n\t""nop\n\t""nop\n\t""nop\n\t");
I have an Arduino that has to wait for the exact (and small, around 10-15) number of hours. Each "nop" (without operation) takes exactly 1 clock cycle, which must be executed, and it does nothing. I canโt just execute a loop, because each loop is executed in more than one operation (initialize the counter, increase the counter, check if it is reached), therefore, instead of writing "nop \ n \ t" manually, I would like to have a macro. That way, I can simply change N to change the program without rewriting it.
Thank you in advance