lesto:
KeithRB:
Don't you need a colon in there to complete the ternary operator '?' ?the colon is for false statement, isn't it optional?
I think a ternary can have an empty expression 1 but must have an expression 2 (the "else" part after the colon)
To flip it, remove the semi colon, and ensure the ternary expression is fully evaluated before the ! (not) in case they pass
in more than a simple variable or constant you could do
#define delayMicroseconds(us) !(us)?:delayMicroseconds(us)
Works, but I bet it isn't as obvious to most as the do/while(0) loop.
do/while(0) is also much more flexible for future modifications.
But we still need to hear from k7michal as all his examples were attempting
to replace a zero delay with a one Us delay to see if that is really a requirement
and why a zero is being passed in to begin with .
--- bill