From a33a11ea1695f0ff8ee890140be629a763a0b218 Mon Sep 17 00:00:00 2001 From: Attila Wagner Date: Wed, 10 Aug 2022 13:55:54 +0100 Subject: [PATCH] Call `cyw43_deinit()` from `cyw43_arch_deinit()` to release the DMA channels and power off the WLAN chip (#965) --- src/rp2_common/pico_cyw43_arch/cyw43_arch_freertos.c | 1 + .../pico_cyw43_arch/cyw43_arch_threadsafe_background.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/rp2_common/pico_cyw43_arch/cyw43_arch_freertos.c b/src/rp2_common/pico_cyw43_arch/cyw43_arch_freertos.c index 2bfb39e..01d9baa 100644 --- a/src/rp2_common/pico_cyw43_arch/cyw43_arch_freertos.c +++ b/src/rp2_common/pico_cyw43_arch/cyw43_arch_freertos.c @@ -168,6 +168,7 @@ void cyw43_arch_deinit(void) { } gpio_set_irq_enabled(CYW43_PIN_WL_HOST_WAKE, GPIO_IRQ_LEVEL_HIGH, false); gpio_remove_raw_irq_handler(IO_IRQ_BANK0, gpio_irq_handler); + cyw43_deinit(&cyw43_state); } void cyw43_post_poll_hook(void) { diff --git a/src/rp2_common/pico_cyw43_arch/cyw43_arch_threadsafe_background.c b/src/rp2_common/pico_cyw43_arch/cyw43_arch_threadsafe_background.c index a3dde74..79ccfd7 100644 --- a/src/rp2_common/pico_cyw43_arch/cyw43_arch_threadsafe_background.c +++ b/src/rp2_common/pico_cyw43_arch/cyw43_arch_threadsafe_background.c @@ -211,6 +211,7 @@ void cyw43_arch_deinit(void) { gpio_set_irq_enabled(CYW43_PIN_WL_HOST_WAKE, GPIO_IRQ_LEVEL_HIGH, false); gpio_remove_raw_irq_handler(IO_IRQ_BANK0, gpio_irq_handler); low_prio_irq_deinit(); + cyw43_deinit(&cyw43_state); } void cyw43_post_poll_hook(void) {