|
40 | 40 | #if defined(CONFIG_IDF_TARGET_ESP32C3) |
41 | 41 | #define INTERNAL_LED_PIN GPIO_NUM_8 |
42 | 42 | #define DEVICE_NAME "ESP32C3LED" |
| 43 | + #ifdef BUTTONS |
| 44 | + #define BUTTON_1_PIN GPIO_NUM_0 |
| 45 | + #define BUTTON_2_PIN GPIO_NUM_1 |
| 46 | + #endif |
43 | 47 | #elif defined(SEEED_XIAO_M0) |
44 | 48 | #define INTERNAL_LED_PIN 13 |
45 | 49 | #elif defined(CONFIG_IDF_TARGET_ESP32) |
46 | 50 | #define INTERNAL_LED_PIN LED_BUILTIN |
47 | 51 | #define DEVICE_NAME "ESP32LED" |
| 52 | + #ifdef BUTTONS |
| 53 | + #define BUTTON_1_PIN GPIO_NUM_0 |
| 54 | + #define BUTTON_2_PIN GPIO_NUM_1 |
| 55 | + #endif |
48 | 56 | #elif defined(ESP8266) |
49 | 57 | #define INTERNAL_LED_PIN LED_BUILTIN |
50 | 58 | #define DEVICE_NAME "ESP8266LED" |
| 59 | + #ifdef BUTTONS |
| 60 | + #define BUTTON_1_PIN D0 |
| 61 | + #define BUTTON_2_PIN D1 |
| 62 | + #endif |
51 | 63 | #else |
52 | 64 | #define INTERNAL_LED_PIN LED_BUILTIN |
53 | 65 | #define DEVICE_NAME "ESPXXLED" |
| 66 | + #ifdef BUTTONS |
| 67 | + #define BUTTON_1_PIN 0 |
| 68 | + #define BUTTON_2_PIN 1 |
| 69 | + #endif |
54 | 70 | #endif |
55 | 71 |
|
56 | 72 | #ifdef WIFI |
|
87 | 103 | #define LED_STRIP_SIZE 267 |
88 | 104 | #define OUTTER_RING_SIZE 141 |
89 | 105 | #else |
90 | | - #define LED_STRIP_SIZE 90 |
| 106 | + #define LED_STRIP_SIZE 103 |
91 | 107 | #define OUTTER_RING_SIZE 240 |
92 | 108 | #endif |
93 | 109 | #define LED_BRIGHTNESS 1 // 0-1, 1-max brightness, make sure your LEDs are powered accordingly |
94 | 110 | #define LED_COLOR_ORDER GRB |
95 | 111 | #endif |
96 | 112 |
|
97 | | -#ifdef BUTTONS |
98 | | - #define BUTTON_1_PIN GPIO_NUM_0 |
99 | | - #define BUTTON_2_PIN GPIO_NUM_1 |
100 | | -#endif |
101 | | - |
102 | 113 | #if defined(CONFIG_IDF_TARGET_ESP32C3) |
103 | 114 | #ifdef OLED // ESD32C3 has a built-in OLED ie ESP32C4 Dev board |
104 | 115 | #define OLED_SCREEN_WIDTH 72 // OLED display width, in pixels |
|
0 commit comments