example: fixed the issue that config struct is not properly initialized

This commit is contained in:
Michael (XIAO Xufeng)
2021-08-30 22:59:36 +08:00
parent 23e8233506
commit cd6ed488c8

View File

@@ -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