docs: update wifi multiple antennas docs

This commit is contained in:
muhaidong 2022-07-14 16:36:46 +08:00
parent bef5f431d9
commit 758e185090

View File

@ -1662,6 +1662,8 @@ The Wi-Fi multiple antennas selecting can be depicted as following picture::
Up to four GPIOs are connected to the four active high antenna_select pins. {IDF_TARGET_NAME} can select the antenna by control the GPIO[0:3]. The API :cpp:func:`esp_wifi_set_ant_gpio()` is used to configure which GPIOs are connected to antenna_selects. If GPIO[x] is connected to antenna_select[x], then gpio_config->gpio_cfg[x].gpio_select should be set to 1 and gpio_config->gpio_cfg[x].gpio_num should be provided.
For the specific implementation of Antenna Switch, there may be illegal values in antenna_select[0:3]. Which means that {IDF_TARGET_NAME} may supports less then sixteen antennas through external antenna switch. For example, ESP32-WROOM-DA supports two antennas which uses RTC6603SP as Antenna Switch. two GPIOs are connected to the two active high antenna_select pins. The value '0b00' and '0b11' are illegal values, the value '0b01' means the antenna 0 is selected, the value '0b10' means the antenna 1 is selected.
Although up to sixteen anteenas are supported, only one or two antennas can be simultaneously enabled for RX/TX. The API :cpp:func:`esp_wifi_set_ant()` is used to configure which antennas are enabled.
The enabled antennas selecting algorithm is also configured by :cpp:func:`esp_wifi_set_ant()`. The RX/TX antenna mode can be WIFI_ANT_MODE_ANT0, WIFI_ANT_MODE_ANT1 or WIFI_ANT_MODE_AUTO. If the antenna mode is WIFI_ANT_MODE_ANT0, the enabled antenna 0 is selected for RX/TX data. If the antenna mode is WIFI_ANT_MODE_ANT1, the enabled antenna 1 is selected for RX/TX data. Otherwise, WiFi automatically selects the antenna that has better signal from the enabled antennas.