fix(spi_slave): add interrupt free into bus free process.

This commit is contained in:
michael 2017-09-30 18:26:55 +08:00
parent 7e8c2a9c00
commit 842292523f

View File

@ -222,6 +222,7 @@ esp_err_t spi_slave_free(spi_host_device_t host)
}
free(spihost[host]->dmadesc_tx);
free(spihost[host]->dmadesc_rx);
esp_intr_free(spihost[host]->intr);
#ifdef CONFIG_PM_ENABLE
esp_pm_lock_release(spihost[host]->pm_lock);
esp_pm_lock_delete(spihost[host]->pm_lock);
@ -229,7 +230,6 @@ esp_err_t spi_slave_free(spi_host_device_t host)
free(spihost[host]);
spihost[host] = NULL;
spicommon_periph_free(host);
spihost[host] = NULL;
return ESP_OK;
}