GPIO_OUTPUT_SET(14, count > 10)
we normally think we can do this as in C, the expression "count > 10" evaluates to a numeric where 0 = false and not 0 = true which matches the bit_value. However, take great care because GPIO_OUTPUT_SET is not a function but is instead a macro and if one looks at its internals ... you will find that supplying an evaluating expression simply won't work. What you have to do is wrap the expression in parenthesis ... for example:
GPIO_OUTPUT_SET(14, (count > 10))
If you don't, your code will compile cleanly but at runtime, you will get unexpected results.
I raised this as a bug with Espressif and supplied the workaround (adding parenthesis around the parameters inside the macro). I thought I'd chance my arm at a bounty
