I'd like to be able to call __rpt_nop(k) where k is a compile-time constant (either an enum, or a #define, or a constant value computed by at compile time e.g. 3*2+7), and have it translate to "RPT #k || NOP" in assembly.
Could you please add this to the intrinsic wishlist for the 28xx compiler?
I can't find a workaround; I don't think it's possible to convert a compile-time constant to a string value for use in inline assembly. >:(
So the only other alternative (besides automatically generated code) is to explicitly state asm("RPT #13 || NOP") or whatever in the code at each point of use. We use compile-time computed constants all the time and it's rather inconvenient not to be able to use it here for ultrashort delays.