7 #ifndef _PICO_CYW43_ARCH_H 8 #define _PICO_CYW43_ARCH_H 20 #ifdef PICO_CYW43_ARCH_HEADER 21 #include __XSTRING(PICO_CYW43_ARCH_HEADER) 23 #if PICO_CYW43_ARCH_POLL 24 #include "pico/cyw43_arch/arch_poll.h" 25 #elif PICO_CYW43_ARCH_THREADSAFE_BACKGROUND 26 #include "pico/cyw43_arch/arch_threadsafe_background.h" 27 #elif PICO_CYW43_ARCH_FREERTOS 28 #include "pico/cyw43_arch/arch_freertos.h" 30 #error must specify support pico_cyw43_arch architecture type or set PICO_CYW43_ARCH_HEADER 134 #ifndef PARAM_ASSERTIONS_ENABLED_CYW43_ARCH 135 #define PARAM_ASSERTIONS_ENABLED_CYW43_ARCH 0 139 #ifndef PICO_CYW43_ARCH_DEBUG_ENABLED 141 #define PICO_CYW43_ARCH_DEBUG_ENABLED 1 143 #define PICO_CYW43_ARCH_DEBUG_ENABLED 0 148 #ifndef PICO_CYW43_ARCH_DEFAULT_COUNTRY_CODE 149 #define PICO_CYW43_ARCH_DEFAULT_COUNTRY_CODE CYW43_COUNTRY_WORLDWIDE 274 cyw43_thread_enter();
318 int rc = func(param);
int cyw43_arch_init_with_country(uint32_t country)
Initialize the CYW43 architecture for use in a specific countryThis method initializes the cyw43_driv...
Definition: cyw43_arch.c:143
int cyw43_arch_init(void)
Initialize the CYW43 architectureThis method initializes the cyw43_driver code and initializes the lw...
void cyw43_arch_deinit(void)
De-initialize the CYW43 architectureThis method de-initializes the cyw43_driver code and de-initializ...
static int cyw43_arch_lwip_protect(int(*func)(void *param), void *param)
sad Release any locks required for calling into lwIPThe lwIP API is not thread safe. You can use this method to wrap a function with any locking required to call into the lwIP API. If you are using single-core polling only (pico_cyw43_arch_poll) then there are no locks to required, but it is still good practice to use this function.
Definition: cyw43_arch.h:316
uint32_t cyw43_arch_get_country_code(void)
Return the country code used to initialize cyw43_arch.
Definition: cyw43_arch.c:139
int cyw43_arch_wifi_connect_timeout_ms(const char *ssid, const char *pw, uint32_t auth, uint32_t timeout)
Attempt to connect to a wireless access point, blocking until the network is joined, a failure is detected or a timeout occurs.
Definition: cyw43_arch.c:131
void cyw43_arch_gpio_put(uint wl_gpio, bool value)
Set a GPIO pin on the wireless chip to a given value.
Definition: cyw43_arch.c:148
static void cyw43_arch_lwip_begin(void)
Acquire any locks required to call into lwIPThe lwIP API is not thread safe. You should surround call...
Definition: cyw43_arch.h:273
int cyw43_arch_wifi_connect_bssid_timeout_ms(const char *ssid, const uint8_t *bssid, const char *pw, uint32_t auth, uint32_t timeout)
Attempt to connect to a wireless access point specified by SSID and BSSID, blocking until the network...
Definition: cyw43_arch.c:135
async_context_t * cyw43_arch_async_context(void)
Return the current async_context currently in use by the cyw43_arch code.
Definition: cyw43_arch.c:160
async_context_t * cyw43_arch_init_default_async_context(void)
Initialize the default async_context for the current cyw43_arch typeThis method initializes and retur...
int cyw43_arch_wifi_connect_blocking(const char *ssid, const char *pw, uint32_t auth)
Attempt to connect to a wireless access point, blocking until the network is joined or a failure is d...
Definition: cyw43_arch.c:123
Base structure type of all async_contexts. For details about its use, see pico_async_context.Individual async_context_types with additional state, should contain this structure at the start.
Definition: async_context.h:175
void cyw43_arch_enable_sta_mode(void)
Enables Wi-Fi STA (Station) mode.This enables the Wi-Fi in mode such that connections can be made to...
Definition: cyw43_arch.c:31
int cyw43_arch_wifi_connect_bssid_async(const char *ssid, const uint8_t *bssid, const char *pw, uint32_t auth)
Start attempting to connect to a wireless access point specified by SSID and BSSIDThis method tells t...
Definition: cyw43_arch.c:73
int cyw43_arch_wifi_connect_async(const char *ssid, const char *pw, uint32_t auth)
Start attempting to connect to a wireless access pointThis method tells the CYW43 driver to start con...
Definition: cyw43_arch.c:79
void cyw43_arch_poll(void)
Perform any processing required by the cyw43_driver or the TCP/IP stackThis method must be called per...
Definition: cyw43_arch.c:164
bool cyw43_arch_gpio_get(uint wl_gpio)
Read the value of a GPIO pin on the wireless chip.
Definition: cyw43_arch.c:153
int cyw43_arch_wifi_connect_bssid_blocking(const char *ssid, const uint8_t *bssid, const char *pw, uint32_t auth)
Attempt to connect to a wireless access point specified by SSID and BSSID, blocking until the network...
Definition: cyw43_arch.c:127
static void cyw43_arch_lwip_end(void)
Release any locks required for calling into lwIPThe lwIP API is not thread safe. You should surround ...
Definition: cyw43_arch.h:296
void cyw43_arch_set_async_context(async_context_t *context)
Set the async_context to be used by the cyw43_arch_init.
Definition: cyw43_arch.c:27
void cyw43_arch_enable_ap_mode(const char *ssid, const char *password, uint32_t auth)
Enables Wi-Fi AP (Access point) mode.This enables the Wi-Fi in Access Point mode such that connection...
Definition: cyw43_arch.c:36
void cyw43_arch_wait_for_work_until(absolute_time_t until)
Sleep until there is cyw43_driver work to be doneThis method may be called by code that is waiting fo...
Definition: cyw43_arch.c:169