diff --git a/examples/peripherals/gpio/main/gpio_example_main.c b/examples/peripherals/gpio/main/gpio_example_main.c index 9609daf799..b0665884f4 100644 --- a/examples/peripherals/gpio/main/gpio_example_main.c +++ b/examples/peripherals/gpio/main/gpio_example_main.c @@ -59,7 +59,8 @@ static void gpio_task_example(void* arg) void app_main(void) { - gpio_config_t io_conf; + //zero-initialize the config structure. + gpio_config_t io_conf = {}; //disable interrupt io_conf.intr_type = GPIO_PIN_INTR_DISABLE; //set as output mode