mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
Merge branch 'bugfix/gpio_example_config_struct_zero_init_v4.2' into 'release/v4.2'
example: fixed the issue that config struct is not properly initialized (v4.2) See merge request espressif/esp-idf!17589
This commit is contained in:
@ -59,7 +59,8 @@ static void gpio_task_example(void* arg)
|
|||||||
|
|
||||||
void app_main(void)
|
void app_main(void)
|
||||||
{
|
{
|
||||||
gpio_config_t io_conf;
|
//zero-initialize the config structure.
|
||||||
|
gpio_config_t io_conf = {};
|
||||||
//disable interrupt
|
//disable interrupt
|
||||||
io_conf.intr_type = GPIO_PIN_INTR_DISABLE;
|
io_conf.intr_type = GPIO_PIN_INTR_DISABLE;
|
||||||
//set as output mode
|
//set as output mode
|
||||||
|
Reference in New Issue
Block a user