diff --git a/examples/blink/blink.c b/examples/blink/blink.c index 92fe700..9d2ae3c 100644 --- a/examples/blink/blink.c +++ b/examples/blink/blink.c @@ -8,7 +8,7 @@ #include "task.h" #include "esp8266.h" -const int gpio = 14; +const int gpio = 2; /* This task uses the high level GPIO API (esp_gpio.h) to blink an LED. * @@ -30,7 +30,7 @@ void blinkenTask(void *pvParameters) The step that sets the iomux register can't be automatically updated from the 'gpio' constant variable, so you need to change - the line that sets IOMUX_GPIO14 if you change 'gpio'. + the line that sets IOMUX_GPIO2 if you change 'gpio'. There is no significant performance benefit to this way over the blinkenTask version, so it's probably better to use the blinkenTask @@ -41,7 +41,7 @@ void blinkenTask(void *pvParameters) void blinkenRegisterTask(void *pvParameters) { GPIO.ENABLE_OUT_SET = BIT(gpio); - IOMUX_GPIO14 = IOMUX_GPIO14_FUNC_GPIO | IOMUX_PIN_OUTPUT_ENABLE; /* change this line if you change 'gpio' */ + IOMUX_GPIO2 = IOMUX_GPIO2_FUNC_GPIO | IOMUX_PIN_OUTPUT_ENABLE; /* change this line if you change 'gpio' */ while(1) { GPIO.OUT_SET = BIT(gpio); vTaskDelay(1000 / portTICK_RATE_MS);