|
|
пре 2 година | |
|---|---|---|
| .. | ||
| COMPONENT_CAT4 | пре 2 година | |
| COMPONENT_LWIP | пре 2 година | |
| COMPONENT_NETXDUO | пре 2 година | |
| .cyignore | пре 2 година | |
| EULA | пре 2 година | |
| LICENSE | пре 2 година | |
| README.md | пре 2 година | |
| RELEASE.md | пре 2 година | |
| cy_network_buffer.h | пре 2 година | |
| cy_wifi_fw_section.h | пре 2 година | |
| cybsp_wifi.c | пре 2 година | |
| cybsp_wifi.h | пре 2 година | |
| props.json | пре 2 година | |
This library provides some convenience functions for connecting the WiFi Host Driver (WHD) library to a Board Support Package (BSP) that includes a WLAN chip. This library initializes the hardware and passes a reference to the communication interface on the board into WHD. It also sets up the LwIP or NetXDuo based network buffers to be used for sending packets back and forth.
The BSP is expected to set a component indicating what communication interface to use to relay information between the MCU and the WIFI chip. The legal options are restricted based on what MCU and WIFI chips are being used. The selected interface must be supported by both sides. The legal component values are one of:
Some additional customization of the library is possible by setting defines when building the library. If no custom value is provided, the library will pick a reasonable default value. The following options are available for customization:
To use this library:
Implement the cy_network_process_ethernet_data() function. This should be something similar to the example below.
/* This needs to be the same item as passed to netifapi_netif_add() */
static struct netif *default_interface = NULL;
void cy_network_process_ethernet_data(whd_interface_t iface, whd_buffer_t buf)
{
if (default_interface != NULL)
{
if (default_interface->input(buf, default_interface) != ERR_OK)
cy_buffer_release(buf, WHD_NETWORK_RX);
}
else
{
cy_buffer_release(buf, WHD_NETWORK_RX);
}
}
Include a reference to cybsp_wifi.h.
Call cybsp_wifi_init_primary() to initialize the interface. This needs to be done after having called cybsp_init().
© Cypress Semiconductor Corporation (an Infineon company) or an affiliate of Cypress Semiconductor Corporation, 2019-2022.