add cyw43_arch_disable_ap_mode() to cyw43_arch (#1331)

This commit is contained in:
Michael Busby 2023-05-25 13:21:48 -07:00 committed by GitHub
parent 8ebb83ccaa
commit 1d9f1873d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View File

@ -45,6 +45,11 @@ void cyw43_arch_enable_ap_mode(const char *ssid, const char *password, uint32_t
cyw43_wifi_set_up(&cyw43_state, CYW43_ITF_AP, true, cyw43_arch_get_country_code());
}
void cyw43_arch_disable_ap_mode() {
assert(cyw43_is_initialized(&cyw43_state));
cyw43_wifi_set_up(&cyw43_state, CYW43_ITF_AP, false, cyw43_arch_get_country_code());
}
#if PICO_CYW43_ARCH_DEBUG_ENABLED
// Return a string for the wireless state
static const char* cyw43_tcpip_link_status_name(int status)

View File

@ -368,6 +368,14 @@ void cyw43_arch_enable_sta_mode(void);
* \ref CYW43_AUTH_WPA2_AES_PSK, or \ref CYW43_AUTH_WPA2_MIXED_PSK (see \ref CYW43_AUTH_)
*/
void cyw43_arch_enable_ap_mode(const char *ssid, const char *password, uint32_t auth);
/*!
* \brief Disables Wi-Fi AP (Access point) mode.
* \ingroup pico_cyw43_arch
*
* This Disbles the Wi-Fi in \em Access \em Point mode.
*/
void cyw43_arch_disable_ap_mode();
/*!
* \brief Attempt to connect to a wireless access point, blocking until the network is joined or a failure is detected.