Browse Source

examples/blinky: Blink GPIO2 by default, ESP-12 have builtin LED there.

Paul Sokolovsky 8 năm trước cách đây
mục cha
commit
bf5eb90f34
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      examples/blinky/blinky.c

+ 3 - 1
examples/blinky/blinky.c

@@ -3,7 +3,9 @@
 #include "gpio.h"
 #include "gpio.h"
 #include "os_type.h"
 #include "os_type.h"
 
 
-static const int pin = 1;
+// ESP-12 modules have LED on GPIO2. Change to another GPIO
+// for other boards.
+static const int pin = 2;
 static volatile os_timer_t some_timer;
 static volatile os_timer_t some_timer;
 
 
 void some_timerfunc(void *arg)
 void some_timerfunc(void *arg)