-->
Page 1 of 1

Unable to set HIGH for any pins but GPIO2

PostPosted: Fri Apr 01, 2016 7:54 am
by anderson
Hi guys!

I'm having a problem with my ESP8266-07. Everything works fine (WiFi, button interrupt etc), but I just can't blink more than 1 LED. Here's my code:

Code: Select allvoid uset_init(void) {
    // ...
    PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO0_U, FUNC_GPIO0);
    PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO2_U, FUNC_GPIO2);
    PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO4_U, FUNC_GPIO4);
    // ...
    // Timer initialization
    // ...
}

void set_lights(bool enabled) {
    if (enabled) {
        gpio_output_set(BIT2, BIT4, BIT2 | BIT4, 0);
    } else {
        gpio_output_set(BIT4, BIT2, BIT2 | BIT4, 0);
    }
}


All I get here is one LED connected to GPIO2 blinking, but not one connected to GPIO4.
I tried other GPIO pins with no luck - only GPIO2 HIGH output works.

Any ideas what am I doing wrong?

Thanks in advance!

Andrew