On the line gpio_pulldown_en(GPIO_SYNC0_IN); I get the following error:
argument of type “int” is incompatible with parameter of type “gpio_num_t”
If I cas itt, as below, to gpio_num_t it seems to build ok, is that going to be gotcha somewhere else?
``
gpio_pulldown_en((gpio_num_t) GPIO_SYNC0_IN);
So in your cae the value 4 is also the value of the enum GPIO_NUM_4 (which is probably what you want to use), so you’re good in this case. In C++ however this enum and ints are distinctive types and a cast must be made.