Skip to content

Commit 6a513ef

Browse files
ihaAnas Nashif
authored andcommitted
drivers: gpio: Fix typo on esp32
esp32 has 40 gpio ports but some ranges are wrote 32_63 instead of 32_39. Signed-off-by: Vitor Massaru Iha <[email protected]>
1 parent d051740 commit 6a513ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpio/gpio_esp32.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ static struct gpio_esp32_data gpio_data_pins_0_to_31 = {
312312
#endif
313313

314314
#if defined(CONFIG_GPIO_ESP32_1)
315-
static struct gpio_esp32_data gpio_data_pins_32_to_63 = {
315+
static struct gpio_esp32_data gpio_data_pins_32_to_39 = {
316316
.port = {
317317
.write = {
318318
.set_reg = (u32_t *)GPIO_OUT1_W1TS_REG,
@@ -349,7 +349,7 @@ GPIO_DEVICE_INIT(CONFIG_GPIO_ESP32_0_NAME, 0_to_31);
349349
#endif
350350

351351
#if defined(CONFIG_GPIO_ESP32_1)
352-
GPIO_DEVICE_INIT(CONFIG_GPIO_ESP32_1_NAME, 32_to_63);
352+
GPIO_DEVICE_INIT(CONFIG_GPIO_ESP32_1_NAME, 32_to_39);
353353
#endif
354354

355355
static void gpio_esp32_isr(void *param)
@@ -358,7 +358,7 @@ static void gpio_esp32_isr(void *param)
358358
gpio_esp32_fire_callbacks(DEVICE_GET(gpio_esp32_0_to_31));
359359
#endif
360360
#if defined(CONFIG_GPIO_ESP32_1)
361-
gpio_esp32_fire_callbacks(DEVICE_GET(gpio_esp32_32_to_63));
361+
gpio_esp32_fire_callbacks(DEVICE_GET(gpio_esp32_32_to_39));
362362
#endif
363363

364364
ARG_UNUSED(param);

0 commit comments

Comments
 (0)